Skip to content

Commit 02ad518

Browse files
committed
test-require-resolve: use case insensitive compare
The test fixtures dirrectory is derived from the path to the currently running script, which is itself specified on the command line. That means that the case of the fixtures dir may not match what the test expects (when executed on a case-insensitive filesystem).
1 parent e24fa83 commit 02ad518

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/simple/test-require-resolve.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ var fixturesDir = common.fixturesDir;
2424
var assert = require('assert');
2525
var path = require('path');
2626

27-
assert.equal(path.join(__dirname, '../fixtures/a.js'),
28-
path.normalize(require.resolve('../fixtures/a')));
29-
assert.equal(path.join(fixturesDir, 'a.js'),
30-
path.normalize(require.resolve(path.join(fixturesDir, 'a'))));
27+
assert.equal(path.join(__dirname, '../fixtures/a.js').toLowerCase(),
28+
require.resolve('../fixtures/a').toLowerCase());
29+
assert.equal(path.join(fixturesDir, 'a.js').toLowerCase(),
30+
require.resolve(path.join(fixturesDir, 'a')).toLowerCase());
3131
assert.equal(path.join(fixturesDir, 'nested-index', 'one', 'index.js'),
32-
path.normalize(require.resolve('../fixtures/nested-index/one')));
32+
require.resolve('../fixtures/nested-index/one').toLowerCase());
3333
assert.equal('path', require.resolve('path'));
3434

3535
console.log('ok');

0 commit comments

Comments
 (0)