diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2018-03-13 00:15:08 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2018-04-11 04:16:47 +0300 |
commit | 429498a8c8d4414bf242be6a3f3a08f9a2adcdf9 (patch) | |
tree | 788aa93e794bda34f68578e7d8f87e0c3a73f6b5 /test | |
parent | 9a9d7809e30d1add21b760804be4a829e3c7e39e (diff) |
inflate-shrinkwrap: allow fakeChildren for non-integrity types
Credit: @zkat
PR-URL: https://github.com/npm/npm/pull/20029
Reviewed-By: @iarna
Diffstat (limited to 'test')
-rw-r--r-- | test/tap/install-cli-only-production.js | 10 | ||||
-rw-r--r-- | test/tap/install-cli-only-shrinkwrap.js | 9 |
2 files changed, 11 insertions, 8 deletions
diff --git a/test/tap/install-cli-only-production.js b/test/tap/install-cli-only-production.js index 7f46a23e1..40328d773 100644 --- a/test/tap/install-cli-only-production.js +++ b/test/tap/install-cli-only-production.js @@ -47,9 +47,9 @@ test('setup', function (t) { JSON.stringify(dependency, null, 2) ) - mkdirp.sync(path.join(pkg, 'devDependency')) + mkdirp.sync(path.join(pkg, 'dev-dependency')) fs.writeFileSync( - path.join(pkg, 'devDependency', 'package.json'), + path.join(pkg, 'dev-dependency', 'package.json'), JSON.stringify(devDependency, null, 2) ) @@ -64,8 +64,10 @@ test('setup', function (t) { }) test('\'npm install --only=production\' should only install dependencies', function (t) { - common.npm(['install', '--only=production'], EXEC_OPTS, function (err, code) { - t.ifError(err, 'install production successful') + common.npm(['install', '--only=production'], EXEC_OPTS, function (err, code, stdout, stderr) { + if (err) throw err + t.comment('1> ' + stdout) + t.comment('2> ' + stderr) t.equal(code, 0, 'npm install did not raise error code') t.ok( JSON.parse(fs.readFileSync( diff --git a/test/tap/install-cli-only-shrinkwrap.js b/test/tap/install-cli-only-shrinkwrap.js index 17ff1ec95..aa731909d 100644 --- a/test/tap/install-cli-only-shrinkwrap.js +++ b/test/tap/install-cli-only-shrinkwrap.js @@ -29,14 +29,14 @@ var shrinkwrap = { name: 'install-cli-only-shrinkwrap', description: 'fixture', version: '0.0.0', + lockfileVersion: 1, + requires: true, dependencies: { dependency: { - version: '0.0.0', - from: 'file:./dependency' + version: 'file:./dependency' }, 'dev-dependency': { - version: '0.0.0', - from: 'file:./dev-dependency', + version: 'file:./dev-dependency', dev: true } } @@ -55,6 +55,7 @@ var devDependency = { } test('setup', function (t) { + cleanup() setup() t.pass('setup ran') t.end() |