diff options
author | Gibson Fahnestock <gib@uk.ibm.com> | 2017-01-08 13:19:00 +0000 |
---|---|---|
committer | Gibson Fahnestock <gib@uk.ibm.com> | 2017-01-11 11:43:52 +0000 |
commit | 7a0e462f9facfff8ccd7b37eb5b65db1c2b2f55f (patch) | |
tree | a971102d320e17e6cb3d00c48fe708b2b86c8136 /test/sequential/test-module-loading.js | |
parent | 1ef401ce92d6195878b9d041cc969612628f5852 (diff) | |
download | android-node-v8-7a0e462f9facfff8ccd7b37eb5b65db1c2b2f55f.tar.gz android-node-v8-7a0e462f9facfff8ccd7b37eb5b65db1c2b2f55f.tar.bz2 android-node-v8-7a0e462f9facfff8ccd7b37eb5b65db1c2b2f55f.zip |
test: use eslint to fix var->const/let
Manually fix issues that eslint --fix couldn't do automatically.
PR-URL: https://github.com/nodejs/node/pull/10685
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'test/sequential/test-module-loading.js')
-rw-r--r-- | test/sequential/test-module-loading.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js index 54fcc5c06a..dd4e7ba76b 100644 --- a/test/sequential/test-module-loading.js +++ b/test/sequential/test-module-loading.js @@ -101,7 +101,7 @@ assert.ok(my_path.path_func instanceof Function); // this one does not exist and should throw assert.throws(function() { require('./utils'); }); -var errorThrown = false; +let errorThrown = false; try { require('../fixtures/throws_error'); } catch (e) { @@ -113,7 +113,7 @@ assert.strictEqual(require('path').dirname(__filename), __dirname); console.error('load custom file types with extensions'); require.extensions['.test'] = function(module, filename) { - var content = fs.readFileSync(filename).toString(); + let content = fs.readFileSync(filename).toString(); assert.strictEqual('this is custom source\n', content); content = content.replace('this is custom source', 'exports.test = \'passed\''); @@ -193,8 +193,8 @@ assert.deepStrictEqual(json, { // modules that we've required, and that all of them contain // the appropriate children, and so on. -var children = module.children.reduce(function red(set, child) { - var id = path.relative(path.dirname(__dirname), child.id); +const children = module.children.reduce(function red(set, child) { + let id = path.relative(path.dirname(__dirname), child.id); id = id.replace(/\\/g, '/'); set[id] = child.children.reduce(red, {}); return set; |