test: decrease inconsistency in the common.js
Checklist
-
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
test
Description of change
- Several non-reassigned
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.