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

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuy Adorno <ruyadorno@hotmail.com>2020-07-30 00:08:24 +0300
committerRuy Adorno <ruyadorno@hotmail.com>2020-07-30 00:08:24 +0300
commit83f4a0914de25e9ea03191d8dc6ffc8dbb73bb3a (patch)
tree3ba088988c4da356ed4aa0e2245cfb75a69677fb /test/lib/publish.js
parent2652baaf7cab47c58360ebbecaf951fa8b9e1862 (diff)
fix: test/lib/publish.js test
Diffstat (limited to 'test/lib/publish.js')
-rw-r--r--test/lib/publish.js16
1 files changed, 5 insertions, 11 deletions
diff --git a/test/lib/publish.js b/test/lib/publish.js
index 15a876297..627cb71f8 100644
--- a/test/lib/publish.js
+++ b/test/lib/publish.js
@@ -121,7 +121,7 @@ test('should log tarball contents', (t) => {
})
})
-test('shows usage with wrong set of arguments', async (t) => {
+test('shows usage with wrong set of arguments', (t) => {
const publish = requireInject('../../lib/publish.js', {
'../../lib/npm.js': {
flatOptions: {
@@ -131,16 +131,10 @@ test('shows usage with wrong set of arguments', async (t) => {
}
})
- const printUsage = async () => {
- let usage
- await publish(['a', 'b', 'c'], (str) => {
- if (str) usage = str
- })
- return usage
- }
- const info = await printUsage()
-
- t.matchSnapshot(info)
+ publish(['a', 'b', 'c'], (result) => {
+ t.matchSnapshot(result, 'should print usage')
+ t.end()
+ })
})
test('throws when invalid tag', (t) => {