Skip to content

Commit

Permalink
test-require-resolve: use case insensitive compare
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
piscisaureus committed Dec 8, 2014
1 parent e24fa83 commit 02ad518
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/simple/test-require-resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ var fixturesDir = common.fixturesDir;
var assert = require('assert');
var path = require('path');

assert.equal(path.join(__dirname, '../fixtures/a.js'),
path.normalize(require.resolve('../fixtures/a')));
assert.equal(path.join(fixturesDir, 'a.js'),
path.normalize(require.resolve(path.join(fixturesDir, 'a'))));
assert.equal(path.join(__dirname, '../fixtures/a.js').toLowerCase(),
require.resolve('../fixtures/a').toLowerCase());
assert.equal(path.join(fixturesDir, 'a.js').toLowerCase(),
require.resolve(path.join(fixturesDir, 'a')).toLowerCase());
assert.equal(path.join(fixturesDir, 'nested-index', 'one', 'index.js'),
path.normalize(require.resolve('../fixtures/nested-index/one')));
require.resolve('../fixtures/nested-index/one').toLowerCase());
assert.equal('path', require.resolve('path'));

console.log('ok');

0 comments on commit 02ad518

Please sign in to comment.