Browse Source

test: refactor test-require-resolve

* var => const
* assert.equal() => assert.strictEqual()

PR-URL: https://github.com/nodejs/node/pull/10120
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
v6
blugavere 8 years ago
committed by Rich Trott
parent
commit
2df3fd9856
  1. 16
      test/parallel/test-require-resolve.js

16
test/parallel/test-require-resolve.js

@ -1,18 +1,18 @@
'use strict'; 'use strict';
var common = require('../common'); const common = require('../common');
var fixturesDir = common.fixturesDir; const fixturesDir = common.fixturesDir;
var assert = require('assert'); const assert = require('assert');
var path = require('path'); const path = require('path');
assert.equal( assert.strictEqual(
path.join(__dirname, '../fixtures/a.js').toLowerCase(), path.join(__dirname, '../fixtures/a.js').toLowerCase(),
require.resolve('../fixtures/a').toLowerCase()); require.resolve('../fixtures/a').toLowerCase());
assert.equal( assert.strictEqual(
path.join(fixturesDir, 'a.js').toLowerCase(), path.join(fixturesDir, 'a.js').toLowerCase(),
require.resolve(path.join(fixturesDir, 'a')).toLowerCase()); require.resolve(path.join(fixturesDir, 'a')).toLowerCase());
assert.equal( assert.strictEqual(
path.join(fixturesDir, 'nested-index', 'one', 'index.js').toLowerCase(), path.join(fixturesDir, 'nested-index', 'one', 'index.js').toLowerCase(),
require.resolve('../fixtures/nested-index/one').toLowerCase()); require.resolve('../fixtures/nested-index/one').toLowerCase());
assert.equal('path', require.resolve('path')); assert.strictEqual('path', require.resolve('path'));
console.log('ok'); console.log('ok');

Loading…
Cancel
Save