Skip to content
This repository has been archived by the owner on Aug 31, 2018. It is now read-only.

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/node#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>
  • Loading branch information
matthewmeyer authored and addaleax committed Oct 15, 2017
1 parent b801846 commit e7898b7
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 e7898b7

Please sign in to comment.