Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Commit

Permalink
test: fix test-require-resolve.js on iOS.
Browse files Browse the repository at this point in the history
In iOS the test folder is copied to a temp folder with write access,
therefore 'common.fixturesDir' starts from a different root compared
to '__dirname'.
  • Loading branch information
enricogior committed Mar 2, 2017
1 parent 0152624 commit da3702f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/simple/test-require-resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ assert.equal(path.join(__dirname, '../fixtures/a.js'),
require.resolve('../fixtures/a'));
assert.equal(path.join(fixturesDir, 'a.js'),
require.resolve(path.join(fixturesDir, 'a')));
assert.equal(path.join(fixturesDir, 'nested-index', 'one', 'index.js'),
require.resolve('../fixtures/nested-index/one'));
if (process.platform === 'ios') {
assert.equal(path.join(__dirname, '../fixtures', 'nested-index', 'one', 'index.js'),
require.resolve('../fixtures/nested-index/one'));
} else {
assert.equal(path.join(fixturesDir, 'nested-index', 'one', 'index.js'),
require.resolve('../fixtures/nested-index/one'));
}
assert.equal('path', require.resolve('path'));

console.log('ok');
console.log('ok');

0 comments on commit da3702f

Please sign in to comment.