0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-require-resolve.js
blugavere 2df3fd9856 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>
2016-12-05 21:57:16 -08:00

19 lines
662 B
JavaScript

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