Skip to content

Commit b1506f7

Browse files
matthewmeyertniessen
authored andcommitted
test: use fixtures.path instead of fixturesDir
Updated parallel/test-require-resolve.js to use the fixtures module. PR-URL: #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>
1 parent 981595c commit b1506f7

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

test/parallel/test-require-resolve.js

+8-9
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,19 @@
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
'use strict';
23-
const common = require('../common');
24-
const fixturesDir = common.fixturesDir;
23+
require('../common');
24+
const fixtures = require('../common/fixtures');
2525
const assert = require('assert');
26-
const path = require('path');
2726

2827
assert.strictEqual(
29-
path.join(__dirname, '../fixtures/a.js').toLowerCase(),
30-
require.resolve('../fixtures/a').toLowerCase());
28+
fixtures.path('a.js').toLowerCase(),
29+
require.resolve(fixtures.path('a').toLowerCase()));
3130
assert.strictEqual(
32-
path.join(fixturesDir, 'a.js').toLowerCase(),
33-
require.resolve(path.join(fixturesDir, 'a')).toLowerCase());
31+
fixtures.path('a.js').toLowerCase(),
32+
require.resolve(fixtures.path('a')).toLowerCase());
3433
assert.strictEqual(
35-
path.join(fixturesDir, 'nested-index', 'one', 'index.js').toLowerCase(),
36-
require.resolve('../fixtures/nested-index/one').toLowerCase());
34+
fixtures.path('nested-index', 'one', 'index.js').toLowerCase(),
35+
require.resolve(fixtures.path('nested-index', 'one').toLowerCase()));
3736
assert.strictEqual('path', require.resolve('path'));
3837

3938
console.log('ok');

0 commit comments

Comments
 (0)