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:
Diffstat (limited to 'deps/npm/test/lib/unpublish.js')
-rw-r--r--deps/npm/test/lib/unpublish.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/deps/npm/test/lib/unpublish.js b/deps/npm/test/lib/unpublish.js
index 11e24714d81..c1fbed57eb4 100644
--- a/deps/npm/test/lib/unpublish.js
+++ b/deps/npm/test/lib/unpublish.js
@@ -310,16 +310,12 @@ t.test('silent', t => {
})
})
-t.test('completion', t => {
- const testComp = (t, { completion, argv, partialWord, expect, title }) =>
- new Promise((resolve, rej) => {
- completion({conf: {argv: {remain: argv}}, partialWord}, (er, res) => {
- if (er)
- rej(er)
- t.strictSame(res, expect, title || argv.join(' '))
- resolve()
- })
- })
+t.test('completion', async t => {
+ const testComp =
+ async (t, { completion, argv, partialWord, expect, title }) => {
+ const res = await completion({conf: {argv: {remain: argv}}, partialWord})
+ t.strictSame(res, expect, title || argv.join(' '))
+ }
t.test('completing with multiple versions from the registry', async t => {
const { completion } = requireInject('../../lib/unpublish.js', {