-
Notifications
You must be signed in to change notification settings - Fork 155
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
Fixed #708: Added 'use strict' and replaced var with let/const in fs.appendFile.spec.js #713
Conversation
Codecov Report
@@ Coverage Diff @@
## master #713 +/- ##
=======================================
Coverage 86.71% 86.71%
=======================================
Files 16 16
Lines 1746 1746
=======================================
Hits 1514 1514
Misses 232 232
Continue to review full report at Codecov.
|
tests/spec/fs.appendFile.spec.js
Outdated
|
||
describe('fs.appendFile', function() { | ||
const contents = 'This is a file.'; | ||
|
||
beforeEach(function(done) { | ||
util.setup(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.
This could probably be const
tests/spec/fs.appendFile.spec.js
Outdated
@@ -16,13 +18,13 @@ describe('fs.appendFile', function() { | |||
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.
let fs = util.fs(); | |
const 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 can change all your let
s to const
in this file, since none of the variables are changing after you declare them.
Otherwise, this looks good. Nice work. Let me know when you've done this so I can re-review.
This reverts commit 8aa5cbb.
As informed, all variables will not change at all in this file, therefore all `let` declarations have been changed to `const`
Made all changes that were requested professor. Also, I didn't realize that committing via VSC would commit to github as well, hence the 1 letter commit name at first. I reverted and recommitted properly. |
@DavidLi119 I see you've pushed a new commit, and wanted to fix your commit message. Here's a tip:
The |
Ah, thanks for the recommendation, I will keep it in mind for next time. |
Added
'use strict'
at the top of the file, then replaced var with const:Same with
let
: