diff options
author | Ruy Adorno <ruyadorno@hotmail.com> | 2021-03-04 17:40:28 -0500 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2021-03-05 15:32:56 -0500 |
commit | f3d3769f9f6da29fb562f25074cda6c86a0366df (patch) | |
tree | 4a233305c3fcb06212a83a080f2ac988dbd3a6b9 /deps/npm/test/lib/update.js | |
parent | 54bb7e3bff819431af1e860daf46844859e002c0 (diff) | |
download | node-new-f3d3769f9f6da29fb562f25074cda6c86a0366df.tar.gz |
deps: upgrade npm to 7.6.1
PR-URL: https://github.com/nodejs/node/pull/37606
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'deps/npm/test/lib/update.js')
-rw-r--r-- | deps/npm/test/lib/update.js | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/deps/npm/test/lib/update.js b/deps/npm/test/lib/update.js index 993fbbab56..15195573f5 100644 --- a/deps/npm/test/lib/update.js +++ b/deps/npm/test/lib/update.js @@ -16,7 +16,6 @@ const mocks = { '@npmcli/arborist': class { reify () {} }, - '../../lib/npm.js': npm, '../../lib/utils/reify-finish.js': noop, '../../lib/utils/usage.js': () => 'usage instructions', } @@ -47,15 +46,16 @@ t.test('no args', t => { } } - const update = requireInject('../../lib/update.js', { + const Update = requireInject('../../lib/update.js', { ...mocks, - '../../lib/utils/reify-finish.js': (arb) => { + '../../lib/utils/reify-finish.js': (npm, arb) => { t.isLike(arb, Arborist, 'should reify-finish with arborist instance') }, '@npmcli/arborist': Arborist, }) + const update = new Update(npm) - update([], err => { + update.exec([], err => { if (err) throw err }) @@ -80,15 +80,16 @@ t.test('with args', t => { } } - const update = requireInject('../../lib/update.js', { + const Update = requireInject('../../lib/update.js', { ...mocks, - '../../lib/utils/reify-finish.js': (arb) => { + '../../lib/utils/reify-finish.js': (npm, arb) => { t.isLike(arb, Arborist, 'should reify-finish with arborist instance') }, '@npmcli/arborist': Arborist, }) + const update = new Update(npm) - update(['ipt'], err => { + update.exec(['ipt'], err => { if (err) throw err }) @@ -100,7 +101,7 @@ t.test('update --depth=<number>', t => { npm.prefix = '/project/a' npm.flatOptions.depth = 1 - const update = requireInject('../../lib/update.js', { + const Update = requireInject('../../lib/update.js', { ...mocks, npmlog: { warn: (title, msg) => { @@ -113,8 +114,9 @@ t.test('update --depth=<number>', t => { }, }, }) + const update = new Update(npm) - update([], err => { + update.exec([], err => { if (err) throw err }) @@ -150,12 +152,13 @@ t.test('update --global', t => { reify () {} } - const update = requireInject('../../lib/update.js', { + const Update = requireInject('../../lib/update.js', { ...mocks, '@npmcli/arborist': Arborist, }) + const update = new Update(npm) - update([], err => { + update.exec([], err => { if (err) throw err }) |