blob: ae2351d27621173ff7cf5392360f3a00df917c5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
console.error(__filename);
console.error(module.paths.join('\n')+'\n');
// this should work, and get the one that doesn't throw
var assert = require('assert');
assert.equal(require('bar'), require('../bar.js'));
// since this is inside a node_modules folder,
// it should be impossible to ever see /node_modules in the
// lookup paths, since it's rooted on the uppermost node_modules
// directory.
assert.equal(-1, module.paths.indexOf('/node_modules'));
// this should work, and get the one in ./node_modules/asdf.js
assert.equal(require('asdf'), require('./node_modules/asdf.js'));
|