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

Fix Issue 684: Replace var with const, let in filer/tests/spec/filer.buffer.spec.js #697

Merged
merged 5 commits into from Feb 1, 2019

Conversation

Projects
None yet
5 participants
@rscotchmer
Copy link
Contributor

rscotchmer commented Jan 29, 2019

Replaced instances of var with const and let, depending on the variable being declared. Const was used for the requires, whose values should not change. Let was used for everything else, as the values were permutable and accessed only within the scope they were declared in.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 29, 2019

Codecov Report

Merging #697 into master will decrease coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #697      +/-   ##
==========================================
- Coverage   86.71%   86.63%   -0.08%     
==========================================
  Files          16       16              
  Lines        1746     1736      -10     
==========================================
- Hits         1514     1504      -10     
  Misses        232      232
Impacted Files Coverage Δ
src/filesystem/interface.js 93.29% <0%> (-0.39%) ⬇️
src/fs-watcher.js 92.3% <0%> (ø) ⬆️
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...43b72e1. Read the comment docs.

@OnesQuared
Copy link
Contributor

OnesQuared left a comment

No real objection to the changes, seems pretty good, const was used for global while let was used for local. Only thing I noticed that is irrelevant which was the line 51? I guess you added a extra line and moved the brackets down

@ApolllonDev
Copy link
Contributor

ApolllonDev left a comment

@humphd, @rscotchmer should package-lock.json be updated in PR?

@humphd
Copy link
Contributor

humphd left a comment

This is looking really good. A few things we can do to finish it.

  1. let's roll back the change to package-lock.json, since it's not really part of this fix. You can do that with git checkout master package-lock.json. We can update that file in another separate PR.

  2. You can swap all your let to const below.

  3. Can you add a newline at the end of the file?

Let me know when you've fixed this and pushed your changes, and I'll re-review.

Show resolved Hide resolved tests/spec/filer.buffer.spec.js Outdated
Show resolved Hide resolved tests/spec/filer.buffer.spec.js Outdated
@humphd

This comment has been minimized.

Copy link
Contributor

humphd commented Jan 31, 2019

@ApolllonDev yes, we can do that in a different PR.

roll back changes to package-lock.json, change lets to consts in file…
…r.buffer.spec.js, added new line at the end of filer.buffer.spec.js
@rscotchmer

This comment has been minimized.

Copy link
Contributor Author

rscotchmer commented Feb 1, 2019

Thank you, @humphd @ApolllonDev; just made the requested changes! Let me know if there's anything else that ought to be fixed.

@humphd

humphd approved these changes Feb 1, 2019

Copy link
Contributor

humphd left a comment

Excellent, looks great.

@humphd humphd merged commit 4ba9ede into filerjs:master Feb 1, 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.