diff options
author | Ruy Adorno <ruyadorno@hotmail.com> | 2020-07-30 00:08:24 +0300 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2020-07-30 00:08:24 +0300 |
commit | 83f4a0914de25e9ea03191d8dc6ffc8dbb73bb3a (patch) | |
tree | 3ba088988c4da356ed4aa0e2245cfb75a69677fb /test/lib/publish.js | |
parent | 2652baaf7cab47c58360ebbecaf951fa8b9e1862 (diff) |
fix: test/lib/publish.js test
Diffstat (limited to 'test/lib/publish.js')
-rw-r--r-- | test/lib/publish.js | 16 |
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) => { |