mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
488 B
21 lines
488 B
12 years ago
|
var common = require('../common');
|
||
|
var assert = require('assert');
|
||
|
|
||
|
var module = require('module');
|
||
|
|
||
|
var isWindows = process.platform === 'win32';
|
||
|
|
||
|
var file, delimiter, paths;
|
||
|
|
||
|
if (isWindows) {
|
||
10 years ago
|
file = 'C:\\Users\\Rocko Artischocko\\node_stuff\\foo';
|
||
12 years ago
|
delimiter = '\\'
|
||
|
} else {
|
||
|
file = '/usr/test/lib/node_modules/npm/foo';
|
||
|
delimiter = '/'
|
||
|
}
|
||
|
|
||
|
paths = module._nodeModulePaths(file);
|
||
|
|
||
|
assert.ok(paths.indexOf(file + delimiter + 'node_modules') !== -1);
|
||
10 years ago
|
assert.ok(Array.isArray(paths));
|