diff options
author | Chris Meyers <chris.meyers.fsu@gmail.com> | 2014-09-30 04:33:31 +0400 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2014-10-04 06:25:36 +0400 |
commit | 8d6bfcb88408f5885a2a67409854c43e5c3a23f6 (patch) | |
tree | 5c9739e1e1edea94957a5a155ce538910e96d787 /test/tap/url-dependencies.js | |
parent | f0bc71154adc7faed62abcda0d749fd5dd82a695 (diff) |
tests run with no system-wide side effects
All changes should be confined to the test repo.
Diffstat (limited to 'test/tap/url-dependencies.js')
-rw-r--r-- | test/tap/url-dependencies.js | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/test/tap/url-dependencies.js b/test/tap/url-dependencies.js index 34a77f4bc..8058637de 100644 --- a/test/tap/url-dependencies.js +++ b/test/tap/url-dependencies.js @@ -49,26 +49,21 @@ function tarballWasFetched(output){ function performInstall (cb) { mr({port: common.port, mocks: mockRoutes}, function(s){ - var output = "" - , child = spawn(node, [npm, "install"], { - cwd: pkg, - env: { - "npm_config_registry": common.registry, - "npm_config_cache_lock_stale": 1000, - "npm_config_cache_lock_wait": 1000, - "npm_config_loglevel": "http", - HOME: process.env.HOME, - Path: process.env.PATH, - PATH: process.env.PATH - } - }) - - child.stderr.on("data", function(data){ - output += data.toString() - }) - child.on("close", function () { - s.close() - cb(output) + var opts = { + cwd : pkg, + env: { + "npm_config_registry": common.registry, + "npm_config_cache_lock_stale": 1000, + "npm_config_cache_lock_wait": 1000, + "npm_config_loglevel": "http", + HOME: process.env.HOME, + Path: process.env.PATH, + PATH: process.env.PATH + } + } + common.npm(["install"], opts, function(err, code, stdout, stderr) { + s.close(); + cb(stderr); }) }) } |