diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-07-15 03:30:28 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-07-21 20:40:52 +0300 |
commit | 4f875222445b07016a8294fa5a5bf7418c735489 (patch) | |
tree | fcb4996be68507c06dec905eacff6300d74319e7 /test/sequential | |
parent | 43bd47c352a368db6051b1017225abace015d3c9 (diff) | |
download | android-node-v8-4f875222445b07016a8294fa5a5bf7418c735489.tar.gz android-node-v8-4f875222445b07016a8294fa5a5bf7418c735489.tar.bz2 android-node-v8-4f875222445b07016a8294fa5a5bf7418c735489.zip |
doc, lib, test: do not re-require needlessly
PR-URL: https://github.com/nodejs/node/pull/14244
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Diffstat (limited to 'test/sequential')
-rw-r--r-- | test/sequential/test-child-process-execsync.js | 3 | ||||
-rw-r--r-- | test/sequential/test-module-loading.js | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js index 4dc11253c9..4fb2915010 100644 --- a/test/sequential/test-child-process-execsync.js +++ b/test/sequential/test-child-process-execsync.js @@ -23,8 +23,7 @@ const common = require('../common'); const assert = require('assert'); -const execSync = require('child_process').execSync; -const execFileSync = require('child_process').execFileSync; +const { execFileSync, execSync } = require('child_process'); const TIMER = 200; const SLEEP = 2000; diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js index 8a7bfe15c4..b117555a22 100644 --- a/test/sequential/test-module-loading.js +++ b/test/sequential/test-module-loading.js @@ -146,7 +146,7 @@ try { assert.strictEqual(e.message, 'blah'); } -assert.strictEqual(require('path').dirname(__filename), __dirname); +assert.strictEqual(path.dirname(__filename), __dirname); console.error('load custom file types with extensions'); require.extensions['.test'] = function(module, filename) { |