diff options
Diffstat (limited to 'test/lib/commands/shrinkwrap.js')
-rw-r--r-- | test/lib/commands/shrinkwrap.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/lib/commands/shrinkwrap.js b/test/lib/commands/shrinkwrap.js index efe7e5380..db4021abd 100644 --- a/test/lib/commands/shrinkwrap.js +++ b/test/lib/commands/shrinkwrap.js @@ -23,7 +23,7 @@ t.formatSnapshot = obj => // and make some assertions that should always be true. Sets // the results on t.context for use in child tests const shrinkwrap = async (t, testdir = {}, config = {}, mocks = {}) => { - const { Npm, logs } = mockNpm(t, mocks) + const { Npm, filteredLogs } = mockNpm(t, mocks) const npm = new Npm() await npm.load() @@ -39,8 +39,8 @@ const shrinkwrap = async (t, testdir = {}, config = {}, mocks = {}) => { const newFile = resolve(npm.localPrefix, 'npm-shrinkwrap.json') const oldFile = resolve(npm.localPrefix, 'package-lock.json') - const notices = logs.filter(([title]) => title === 'notice').map(([, , msg]) => msg) - const warnings = logs.filter(([title]) => title === 'warn').map(([, , msg]) => msg) + const notices = filteredLogs('notice') + const warnings = filteredLogs('warn') t.notOk(fs.existsSync(oldFile), 'package-lock is always deleted') t.same(warnings, [], 'no warnings') |