Skip to content
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

Merged
merged 7 commits into from Jan 31, 2019

Conversation

Projects
None yet
3 participants
@DavidLi119
Copy link
Contributor

DavidLi119 commented Jan 30, 2019

Added 'use strict' at the top of the file, then replaced var with const:

var ex = 'unchanging';
// change to
const ex = 'unchanging';

Same with let:

var ex = run();
// change to
let ex = run();

DavidLi119 added some commits Jan 30, 2019

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 30, 2019

Codecov Report

Merging #713 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #713   +/-   ##
=======================================
  Coverage   86.71%   86.71%           
=======================================
  Files          16       16           
  Lines        1746     1746           
=======================================
  Hits         1514     1514           
  Misses        232      232
Impacted Files Coverage Δ
src/shell/environment.js 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 26b47ee...64ddef1. Read the comment docs.


describe('fs.appendFile', function() {
const contents = 'This is a file.';

beforeEach(function(done) {
util.setup(function() {
var fs = util.fs();
let fs = util.fs();

This comment has been minimized.

@humphd

humphd Jan 30, 2019

Contributor

This could probably be const

@@ -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();

This comment has been minimized.

@humphd

humphd Jan 30, 2019

Contributor
Suggested change
let fs = util.fs();
const fs = util.fs();
@humphd
Copy link
Contributor

humphd left a comment

You can change all your lets 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.

DavidLi119 added some commits Jan 31, 2019

s
Revert "s"
This reverts commit 8aa5cbb.
Changed all `let` to `const`
As informed, all variables will not change at all in this file, therefore all `let` declarations have been changed to `const`
@DavidLi119

This comment has been minimized.

Copy link
Contributor Author

DavidLi119 commented Jan 31, 2019

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.

@humphd

This comment has been minimized.

Copy link
Contributor

humphd commented Jan 31, 2019

@DavidLi119 I see you've pushed a new commit, and wanted to fix your commit message. Here's a tip:

git commit --amend -m "New commit message"

The --amend will add/to, update, etc. the old commit with whatever you add, which can be as simple as the commit message changing.

@DavidLi119

This comment has been minimized.

Copy link
Contributor Author

DavidLi119 commented Jan 31, 2019

Ah, thanks for the recommendation, I will keep it in mind for next time.

@humphd humphd merged commit 8751399 into filerjs:master Jan 31, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.