diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/mock-npm.js | 4 | ||||
-rw-r--r-- | test/lib/commands/outdated.js | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/test/fixtures/mock-npm.js b/test/fixtures/mock-npm.js index c9701ebc2..a79812fb7 100644 --- a/test/fixtures/mock-npm.js +++ b/test/fixtures/mock-npm.js @@ -224,6 +224,10 @@ class MockNpm { } } + get global () { + return this.config.get('global') || this.config.get('location') === 'global' + } + output (...msg) { if (this.base.output) { return this.base.output(msg) diff --git a/test/lib/commands/outdated.js b/test/lib/commands/outdated.js index 14647ce6c..4803c7e17 100644 --- a/test/lib/commands/outdated.js +++ b/test/lib/commands/outdated.js @@ -343,7 +343,9 @@ t.test('should return if no outdated deps', async t => { }) await outdated(testDir, { - global: false, + config: { + global: false, + }, }).exec([]) t.equal(logs.length, 0, 'no logs') }) @@ -369,7 +371,9 @@ t.test('throws if error with a dep', async t => { await t.rejects( outdated(testDir, { - global: false, + config: { + global: false, + }, }).exec([]), 'There is an error with this package.' ) @@ -388,7 +392,9 @@ t.test('should skip missing non-prod deps', async t => { }) await outdated(testDir, { - global: false, + config: { + global: false, + }, }).exec([]) t.equal(logs.length, 0, 'no logs') }) |