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: #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 targos committed Oct 18, 2017
1 parent 68bfde9 commit b054a4e
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 b054a4e

Please sign in to comment.