-
Notifications
You must be signed in to change notification settings - Fork 154
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
Fix issue #660: Updated the code to replace var with let, const in strict mode #694
Conversation
yuansheng1989
commented
Jan 29, 2019
- "var" was replaced with "let" or"const"
- "use strict" is added to the file
Codecov Report
@@ Coverage Diff @@
## master #694 +/- ##
=======================================
Coverage 86.71% 86.71%
=======================================
Files 16 16
Lines 1746 1746
=======================================
Hits 1514 1514
Misses 232 232 Continue to review full report at Codecov.
|
Hey, I think it might be better to use const instead of let for fs and contents variables cause we aren't changing their values |
tests/spec/fs.readlink.spec.js
Outdated
|
||
describe('fs.readlink', function() { | ||
beforeEach(util.setup); | ||
afterEach(util.cleanup); | ||
|
||
it('should be a function', function() { | ||
var fs = util.fs(); | ||
let fs = util.fs(); |
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.
You might want to change let to const as we aren't changing "fs" value
tests/spec/fs.readlink.spec.js
Outdated
expect(fs.readlink).to.be.a('function'); | ||
}); | ||
|
||
it('should return an error if part of the parent destination path does not exist', function(done) { | ||
var fs = util.fs(); | ||
let fs = util.fs(); |
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.
Same here
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 great