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/org.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/org.js')
-rw-r--r-- | deps/npm/test/lib/org.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/deps/npm/test/lib/org.js b/deps/npm/test/lib/org.js index 68e3c9f0d6c..1e8aabc1d7e 100644 --- a/deps/npm/test/lib/org.js +++ b/deps/npm/test/lib/org.js @@ -49,13 +49,8 @@ const org = requireInject('../../lib/org.js', { }) test('completion', async t => { - const completion = (argv) => new Promise((resolve, reject) => { - org.completion({ conf: { argv: { remain: argv } } }, (err, res) => { - if (err) - return reject(err) - return resolve(res) - }) - }) + const completion = (argv) => + org.completion({ conf: { argv: { remain: argv } } }) const assertions = [ [['npm', 'org'], ['set', 'rm', 'ls']], @@ -66,7 +61,7 @@ test('completion', async t => { ] for (const [argv, expected] of assertions) - t.strictSame(await completion(argv), expected, `completion for: ${argv.join(', ')}`) + t.resolveMatch(completion(argv), expected, `completion for: ${argv.join(', ')}`) t.rejects(completion(['npm', 'org', 'flurb']), /flurb not recognized/, 'errors for unknown subcommand') }) |