-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
test: decrease inconsistency in the common.js #7758
Conversation
1. Several non-reassigned `var` are replaced by `const` (only in module top evel, function top level, one block boundary). 2. `process.env['PROCESSOR_ARCHITEW6432']` -> `process.env.PROCESSOR_ARCHITEW6432`. 3. `path.dirname(__filename)` -> `__dirname`. 4. `path.resolve(__dirname)` -> `__dirname`.
@vsemozhetbyt Could you remove the |
@Fishrock123 Done. |
LGTM |
3 similar comments
LGTM |
LGTM |
LGTM |
One more CI, will land if it’s green: https://ci.nodejs.org/job/node-test-commit/4287/ |
CI again, that last one failed with infrastructure problems and a known flaky test: https://ci.nodejs.org/job/node-test-commit/4347/ |
1. `process.env['PROCESSOR_ARCHITEW6432']` -> `process.env.PROCESSOR_ARCHITEW6432`. 2. `path.dirname(__filename)` -> `__dirname`. 3. `path.resolve(__dirname)` -> `__dirname`. PR-URL: #7758 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@addaleax Thank you for your help and time. |
1. `process.env['PROCESSOR_ARCHITEW6432']` -> `process.env.PROCESSOR_ARCHITEW6432`. 2. `path.dirname(__filename)` -> `__dirname`. 3. `path.resolve(__dirname)` -> `__dirname`. PR-URL: #7758 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1. `process.env['PROCESSOR_ARCHITEW6432']` -> `process.env.PROCESSOR_ARCHITEW6432`. 2. `path.dirname(__filename)` -> `__dirname`. 3. `path.resolve(__dirname)` -> `__dirname`. PR-URL: #7758 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1. `process.env['PROCESSOR_ARCHITEW6432']` -> `process.env.PROCESSOR_ARCHITEW6432`. 2. `path.dirname(__filename)` -> `__dirname`. 3. `path.resolve(__dirname)` -> `__dirname`. PR-URL: #7758 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1. `process.env['PROCESSOR_ARCHITEW6432']` -> `process.env.PROCESSOR_ARCHITEW6432`. 2. `path.dirname(__filename)` -> `__dirname`. 3. `path.resolve(__dirname)` -> `__dirname`. PR-URL: #7758 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
test
Description of change
var
are replaced byconst
(only in module top level, function top level, one block boundary).process.env['PROCESSOR_ARCHITEW6432']
->process.env.PROCESSOR_ARCHITEW6432
.path.dirname(__filename)
->__dirname
.path.resolve(__dirname)
->__dirname
.I'm not sure about replacing two complicated string cocncatenations in the
exports.ddCommand()
by template strings. If it is a right thing, I could try to add a commit.Sorry, if I have just added some newbie mess instead of fixing. I've tried to understand the
common.js
while doing my first test for Node.js, and stumbled on some fragments, so I've decided to suggest some possible small improvements.