0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-require-resolve.js

18 lines
616 B
JavaScript
Raw Normal View History

2010-12-04 23:45:52 +01:00
var common = require('../common');
var fixturesDir = common.fixturesDir;
var assert = require('assert');
2010-12-04 23:45:52 +01:00
var path = require('path');
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').toLowerCase(),
require.resolve('../fixtures/nested-index/one').toLowerCase());
2010-12-04 23:45:52 +01:00
assert.equal('path', require.resolve('path'));
2010-12-04 23:45:52 +01:00
console.log('ok');