mirror of
https://github.com/nodejs/node.git
synced 2025-05-05 10:27:05 +00:00

In the tests, we use "process.platform === 'win32'" in some places. This patch replaces them with the "common.isWindows" for consistency. PR-URL: https://github.com/nodejs/io.js/pull/2269 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
21 lines
465 B
JavaScript
21 lines
465 B
JavaScript
'use strict';
|
|
var common = require('../common');
|
|
var assert = require('assert');
|
|
|
|
var module = require('module');
|
|
|
|
var file, delimiter, paths;
|
|
|
|
if (common.isWindows) {
|
|
file = 'C:\\Users\\Rocko Artischocko\\node_stuff\\foo';
|
|
delimiter = '\\';
|
|
} else {
|
|
file = '/usr/test/lib/node_modules/npm/foo';
|
|
delimiter = '/';
|
|
}
|
|
|
|
paths = module._nodeModulePaths(file);
|
|
|
|
assert.ok(paths.indexOf(file + delimiter + 'node_modules') !== -1);
|
|
assert.ok(Array.isArray(paths));
|