diff options
author | Ruy Adorno <ruyadorno@hotmail.com> | 2021-03-01 19:38:43 +0300 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2021-03-02 16:08:55 +0300 |
commit | f3d67000a0a6bdce5cbb9ad506a008e5d709bb71 (patch) | |
tree | 650f0737f1d7676f374b523f27bf9b26bb70bb00 /deps/npm/test/lib/token.js | |
parent | 725d48ae777ec23e915370019a60a835a2569711 (diff) |
deps: upgrade npm to 7.6.0
PR-URL: https://github.com/nodejs/node/pull/37559
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Diffstat (limited to 'deps/npm/test/lib/token.js')
-rw-r--r-- | deps/npm/test/lib/token.js | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/deps/npm/test/lib/token.js b/deps/npm/test/lib/token.js index f9888107223..6ab841f4992 100644 --- a/deps/npm/test/lib/token.js +++ b/deps/npm/test/lib/token.js @@ -48,27 +48,18 @@ test('completion', (t) => { t.plan(5) const testComp = (argv, expect) => { - tokenMock.completion({ conf: { argv: { remain: argv } } }, (err, res) => { - if (err) - throw err - - t.strictSame(res, expect, argv.join(' ')) - }) + t.resolveMatch(tokenMock.completion({ conf: { argv: { remain: argv } } }), expect, argv.join(' ')) } - testComp(['npm', 'token'], [ - 'list', - 'revoke', - 'create', - ]) - + testComp(['npm', 'token'], ['list', 'revoke', 'create']) testComp(['npm', 'token', 'list'], []) testComp(['npm', 'token', 'revoke'], []) testComp(['npm', 'token', 'create'], []) - tokenMock.completion({ conf: { argv: { remain: ['npm', 'token', 'foobar'] } } }, (err) => { - t.match(err, { message: 'foobar not recognized' }) - }) + t.rejects( + tokenMock.completion({ conf: { argv: { remain: ['npm', 'token', 'foobar'] } } }), + { message: 'foobar not recognize' } + ) }) test('token foobar', (t) => { |