test: replace var with const in test-require-dot#9916
Conversation
|
closed #9896 as the commit message was not following the guidelines and git commit --amend resulted into 3 commits. |
| var module = require('module'); | ||
| const common = require('../common'); | ||
| const assert = require('assert'); | ||
| const m = require('module'); |
There was a problem hiding this comment.
why not keeping module as it is?
There was a problem hiding this comment.
keeping the module as it is causes an error, hence renaming it something else:
/Users/amarz/summit16/node/test/parallel/test-require-dot.js:4
const module = require('module');
^
SyntaxError: Identifier 'module' has already been declared
gibfahn
left a comment
There was a problem hiding this comment.
LGTM if CI is happy.
FYI, the extra commits possibly came from doing a git pull.
| const c = require('.'); | ||
|
|
||
| assert.equal(c.value, 42, 'require(".") should honor NODE_PATH'); | ||
| assert.strictEqual(c.value, 42, 'require(".") should honor NODE_PATH'); No newline at end of file |
There was a problem hiding this comment.
Nit: can you please add a final new line.
jasnell
left a comment
There was a problem hiding this comment.
LGTM once the lint errors have been fixed.
|
Pushed a commit that added a new line char to satisfy the linter. CI: https://ci.nodejs.org/job/node-test-pull-request/5362/ |
|
Landed fa4f158 Thanks for the contribution. |
PR-URL: #9916 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
PR-URL: #9916 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
PR-URL: #9916 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
PR-URL: #9916 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
Checklist
make -j8 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
Description of change
test: replace
varwithconstin test-require-dot