test: use fixtures.path instead of fixturesDir
Updated parallel/test-require-resolve.js to use the fixtures module. PR-URL: https://github.com/nodejs/node/pull/15984 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
parent
981595c316
commit
b1506f713c
@ -20,20 +20,19 @@
|
|||||||
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
const common = require('../common');
|
require('../common');
|
||||||
const fixturesDir = common.fixturesDir;
|
const fixtures = require('../common/fixtures');
|
||||||
const assert = require('assert');
|
const assert = require('assert');
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
path.join(__dirname, '../fixtures/a.js').toLowerCase(),
|
fixtures.path('a.js').toLowerCase(),
|
||||||
require.resolve('../fixtures/a').toLowerCase());
|
require.resolve(fixtures.path('a').toLowerCase()));
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
path.join(fixturesDir, 'a.js').toLowerCase(),
|
fixtures.path('a.js').toLowerCase(),
|
||||||
require.resolve(path.join(fixturesDir, 'a')).toLowerCase());
|
require.resolve(fixtures.path('a')).toLowerCase());
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
path.join(fixturesDir, 'nested-index', 'one', 'index.js').toLowerCase(),
|
fixtures.path('nested-index', 'one', 'index.js').toLowerCase(),
|
||||||
require.resolve('../fixtures/nested-index/one').toLowerCase());
|
require.resolve(fixtures.path('nested-index', 'one').toLowerCase()));
|
||||||
assert.strictEqual('path', require.resolve('path'));
|
assert.strictEqual('path', require.resolve('path'));
|
||||||
|
|
||||||
console.log('ok');
|
console.log('ok');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user