Skip to content

Commit

Permalink
test: replace var with const in test-require-dot
Browse files Browse the repository at this point in the history
PR-URL: #9916
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
  • Loading branch information
amarzavery authored and Fishrock123 committed Dec 13, 2016
1 parent b99a372 commit 88839cf
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/parallel/test-require-dot.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
'use strict';
var common = require('../common');
var assert = require('assert');
var module = require('module');
const common = require('../common');
const assert = require('assert');
const m = require('module');

var a = require(common.fixturesDir + '/module-require/relative/dot.js');
var b = require(common.fixturesDir + '/module-require/relative/dot-slash.js');
const a = require(common.fixturesDir + '/module-require/relative/dot.js');
const b = require(common.fixturesDir + '/module-require/relative/dot-slash.js');

assert.equal(a.value, 42);
assert.equal(a, b, 'require(".") should resolve like require("./")');
assert.strictEqual(a.value, 42);
assert.strictEqual(a, b, 'require(".") should resolve like require("./")');

process.env.NODE_PATH = common.fixturesDir + '/module-require/relative';
module._initPaths();
m._initPaths();

var c = require('.');
const c = require('.');

assert.equal(c.value, 42, 'require(".") should honor NODE_PATH');
assert.strictEqual(c.value, 42, 'require(".") should honor NODE_PATH');

0 comments on commit 88839cf

Please sign in to comment.