Skip to content

test: decrease inconsistency in the common.js

Rodrigo Muino Tomonari requested to merge github/fork/vsemozhetbyt/patch-1 into master
Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change
  1. Several non-reassigned var are replaced by const (only in module top level, 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.

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.

Merge request reports

Loading