Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuy Adorno <ruyadorno@hotmail.com>2021-03-01 19:38:43 +0300
committerMichaël Zasso <targos@protonmail.com>2021-03-02 16:08:55 +0300
commitf3d67000a0a6bdce5cbb9ad506a008e5d709bb71 (patch)
tree650f0737f1d7676f374b523f27bf9b26bb70bb00 /deps/npm/test/lib/deprecate.js
parent725d48ae777ec23e915370019a60a835a2569711 (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/deprecate.js')
-rw-r--r--deps/npm/test/lib/deprecate.js29
1 files changed, 12 insertions, 17 deletions
diff --git a/deps/npm/test/lib/deprecate.js b/deps/npm/test/lib/deprecate.js
index 229cb9137a4..fd563de1209 100644
--- a/deps/npm/test/lib/deprecate.js
+++ b/deps/npm/test/lib/deprecate.js
@@ -38,29 +38,24 @@ test('completion', async t => {
const { completion } = deprecate
- const testComp = (argv, expect) => {
- return new Promise((resolve, reject) => {
- completion({ conf: { argv: { remain: argv } } }, (err, res) => {
- if (err)
- return reject(err)
-
- t.strictSame(res, expect, `completion: ${argv}`)
- resolve()
- })
- })
+ const testComp = async (argv, expect) => {
+ const res = await completion({ conf: { argv: { remain: argv } } })
+ t.strictSame(res, expect, `completion: ${argv}`)
}
- await testComp([], ['foo', 'bar', 'baz'])
- await testComp(['b'], ['bar', 'baz'])
- await testComp(['fo'], ['foo'])
- await testComp(['g'], [])
- await testComp(['foo', 'something'], [])
+ await Promise.all([
+ testComp([], ['foo', 'bar', 'baz']),
+ testComp(['b'], ['bar', 'baz']),
+ testComp(['fo'], ['foo']),
+ testComp(['g'], []),
+ testComp(['foo', 'something'], []),
+ ])
getIdentityImpl = () => {
- throw new Error('unknown failure')
+ throw new Error('deprecate test failure')
}
- t.rejects(testComp([], []), /unknown failure/)
+ t.rejects(testComp([], []), { message: 'deprecate test failure' })
})
test('no args', t => {