Browse Source

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>
v9.x-staging
Matthew Meyer 7 years ago
committed by Tobias Nießen
parent
commit
b1506f713c
No known key found for this signature in database GPG Key ID: 718207F8FD156B70
  1. 17
      test/parallel/test-require-resolve.js

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

@ -20,20 +20,19 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict';
const common = require('../common');
const fixturesDir = common.fixturesDir;
require('../common');
const fixtures = require('../common/fixtures');
const assert = require('assert');
const path = require('path');
assert.strictEqual(
path.join(__dirname, '../fixtures/a.js').toLowerCase(),
require.resolve('../fixtures/a').toLowerCase());
fixtures.path('a.js').toLowerCase(),
require.resolve(fixtures.path('a').toLowerCase()));
assert.strictEqual(
path.join(fixturesDir, 'a.js').toLowerCase(),
require.resolve(path.join(fixturesDir, 'a')).toLowerCase());
fixtures.path('a.js').toLowerCase(),
require.resolve(fixtures.path('a')).toLowerCase());
assert.strictEqual(
path.join(fixturesDir, 'nested-index', 'one', 'index.js').toLowerCase(),
require.resolve('../fixtures/nested-index/one').toLowerCase());
fixtures.path('nested-index', 'one', 'index.js').toLowerCase(),
require.resolve(fixtures.path('nested-index', 'one').toLowerCase()));
assert.strictEqual('path', require.resolve('path'));
console.log('ok');

Loading…
Cancel
Save