Skip to content

Commit

Permalink
test: use fixtures.path instead of fixturesDir
Browse files Browse the repository at this point in the history
Updated parallel/test-require-resolve.js to use the fixtures module.

PR-URL: nodejs#15984
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
matthewmeyer authored and tniessen committed Oct 13, 2017
1 parent 981595c commit b1506f7
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions test/parallel/test-require-resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

0 comments on commit b1506f7

Please sign in to comment.