-
Notifications
You must be signed in to change notification settings - Fork 156
Fix ssue #692: Update code in filer/tests/spec/time-flags.spec.js #696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi! It looks like you're off to a great start, but I think there are some changes to be made yet. On line 13, you've got a comma instead of a semi-colon, which I think is why your Travis CI build is failing -- I copied your code into my local version of filer, and was able to run the tests perfectly after I fixed that. You're also missing 'use strict' at the top of your file, which you need to use so the file runs in strict mode. I think you could also change the 3 "lets" on lines 3, 4, and 5 to "const"; the values there should never change, so it's safe to use const. |
|
Thank you for your comment. It's strange I tried locally, all tests passed. |
|
I feel you -- I had all tests passing locally, and then when I put up the pull request it decided to fail a few -- the joys of programming, eh? I'm glad all the tests are passing for you now, though! You're definitely right about that comma! My bad, I should've taken a closer look at that one. |
|
Hi, I think you are still missing 'use strict' at the top of your file. |
Codecov Report
@@ Coverage Diff @@
## master #696 +/- ##
==========================================
- Coverage 86.71% 86.63% -0.08%
==========================================
Files 16 16
Lines 1746 1736 -10
==========================================
- Hits 1514 1504 -10
Misses 232 232
Continue to review full report at Codecov.
|
|
Thank you @ithompson4. |
humphd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is on the right track. Two things to do in order to finish it:
-
Can you revert your changes to
package-lock.json? It's unrelated to your other changes, and we tend to make each PR/bug be about one fix. You can do that withgit checkout master package-lock.json -
You can replace all your
lets toconstbelow
After you do that and push a new commit, let me know and I'll re-review.
tests/spec/time-flags.spec.js
Outdated
|
|
||
| var dirname = '/dir'; | ||
| var filename = '/dir/file'; | ||
| let dirname = '/dir'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these let keywords can be switched to const, since the variables aren't going to change value.
humphd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
"var" was replaced by "let", as the passed variable may be modified later. In this case, I avoid using "const".