mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
3e1b1dd4a9
The copyright and license notice is already in the LICENSE file. There is no justifiable reason to also require that it be included in every file, since the individual files are not individually distributed except as part of the entire package.
25 lines
654 B
JavaScript
25 lines
654 B
JavaScript
var common = require('../common');
|
|
var assert = require('assert');
|
|
|
|
var module = require('module');
|
|
|
|
var isWindows = process.platform === 'win32';
|
|
|
|
var partA, partB;
|
|
|
|
if (isWindows) {
|
|
partA = 'C:\\Users\\Rocko Artischocko\\AppData\\Roaming\\npm';
|
|
partB = 'C:\\Program Files (x86)\\nodejs\\';
|
|
process.env['NODE_PATH'] = partA + ';' + partB;
|
|
} else {
|
|
partA = '/usr/test/lib/node_modules';
|
|
partB = '/usr/test/lib/node';
|
|
process.env['NODE_PATH'] = partA + ':' + partB;
|
|
}
|
|
|
|
module._initPaths();
|
|
|
|
assert.ok(module.globalPaths.indexOf(partA) !== -1);
|
|
assert.ok(module.globalPaths.indexOf(partB) !== -1);
|
|
|
|
assert.ok(Array.isArray(module.globalPaths)); |