mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
7a0e462f9f
Manually fix issues that eslint --fix couldn't do automatically. PR-URL: https://github.com/nodejs/node/pull/10685 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
26 lines
715 B
JavaScript
26 lines
715 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const mod = require('module');
|
|
|
|
let partA, partB;
|
|
const partC = '';
|
|
|
|
if (common.isWindows) {
|
|
partA = 'C:\\Users\\Rocko Artischocko\\AppData\\Roaming\\npm';
|
|
partB = 'C:\\Program Files (x86)\\nodejs\\';
|
|
process.env['NODE_PATH'] = partA + ';' + partB + ';' + partC;
|
|
} else {
|
|
partA = '/usr/test/lib/node_modules';
|
|
partB = '/usr/test/lib/node';
|
|
process.env['NODE_PATH'] = partA + ':' + partB + ':' + partC;
|
|
}
|
|
|
|
mod._initPaths();
|
|
|
|
assert.ok(mod.globalPaths.indexOf(partA) !== -1);
|
|
assert.ok(mod.globalPaths.indexOf(partB) !== -1);
|
|
assert.ok(mod.globalPaths.indexOf(partC) === -1);
|
|
|
|
assert.ok(Array.isArray(mod.globalPaths));
|