diff options
author | cjihrig <cjihrig@gmail.com> | 2016-12-30 18:38:06 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2017-01-02 18:28:18 -0500 |
commit | ff1efa60878d8353e1b8e36684a786bdf57963fb (patch) | |
tree | 31399a1732ff2b91374fdcaaf2d5d0976b6a00a7 /test/addons | |
parent | 1605a2e02ae6887e57292543489c76eef5c545d0 (diff) | |
download | android-node-v8-ff1efa60878d8353e1b8e36684a786bdf57963fb.tar.gz android-node-v8-ff1efa60878d8353e1b8e36684a786bdf57963fb.tar.bz2 android-node-v8-ff1efa60878d8353e1b8e36684a786bdf57963fb.zip |
test: use const for all require() calls
PR-URL: https://github.com/nodejs/node/pull/10550
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'test/addons')
-rw-r--r-- | test/addons/async-hello-world/test.js | 2 | ||||
-rw-r--r-- | test/addons/hello-world-function-export/test.js | 2 | ||||
-rw-r--r-- | test/addons/hello-world/test.js | 2 | ||||
-rw-r--r-- | test/addons/load-long-path/test.js | 2 | ||||
-rw-r--r-- | test/addons/repl-domain-abort/test.js | 10 |
5 files changed, 9 insertions, 9 deletions
diff --git a/test/addons/async-hello-world/test.js b/test/addons/async-hello-world/test.js index 7c27382c1c..a6aa8aa20f 100644 --- a/test/addons/async-hello-world/test.js +++ b/test/addons/async-hello-world/test.js @@ -1,6 +1,6 @@ 'use strict'; const common = require('../../common'); -var assert = require('assert'); +const assert = require('assert'); const binding = require(`./build/${common.buildType}/binding`); binding(5, common.mustCall(function(err, val) { diff --git a/test/addons/hello-world-function-export/test.js b/test/addons/hello-world-function-export/test.js index 74ea66c79c..173cf5428e 100644 --- a/test/addons/hello-world-function-export/test.js +++ b/test/addons/hello-world-function-export/test.js @@ -1,6 +1,6 @@ 'use strict'; const common = require('../../common'); -var assert = require('assert'); +const assert = require('assert'); const binding = require(`./build/${common.buildType}/binding`); assert.strictEqual(binding(), 'world'); console.log('binding.hello() =', binding()); diff --git a/test/addons/hello-world/test.js b/test/addons/hello-world/test.js index 32066388ef..b0148e9d9e 100644 --- a/test/addons/hello-world/test.js +++ b/test/addons/hello-world/test.js @@ -1,6 +1,6 @@ 'use strict'; const common = require('../../common'); -var assert = require('assert'); +const assert = require('assert'); const binding = require(`./build/${common.buildType}/binding`); assert.strictEqual(binding.hello(), 'world'); console.log('binding.hello() =', binding.hello()); diff --git a/test/addons/load-long-path/test.js b/test/addons/load-long-path/test.js index b17942b45a..6e540fea55 100644 --- a/test/addons/load-long-path/test.js +++ b/test/addons/load-long-path/test.js @@ -32,6 +32,6 @@ var contents = fs.readFileSync(addonPath); fs.writeFileSync(addonDestinationPath, contents); // Attempt to load at long path destination -var addon = require(addonDestinationPath); +const addon = require(addonDestinationPath); assert.notEqual(addon, null); assert.strictEqual(addon.hello(), 'world'); diff --git a/test/addons/repl-domain-abort/test.js b/test/addons/repl-domain-abort/test.js index 5591b4f2b3..1f30f0f9be 100644 --- a/test/addons/repl-domain-abort/test.js +++ b/test/addons/repl-domain-abort/test.js @@ -1,9 +1,9 @@ 'use strict'; -var common = require('../../common'); -var assert = require('assert'); -var repl = require('repl'); -var stream = require('stream'); -var path = require('path'); +const common = require('../../common'); +const assert = require('assert'); +const repl = require('repl'); +const stream = require('stream'); +const path = require('path'); var buildType = process.config.target_defaults.default_configuration; var buildPath = path.join(__dirname, 'build', buildType, 'binding'); // On Windows, escape backslashes in the path before passing it to REPL. |