Skip to content

Commit

Permalink
tests(cli): try to fix failure on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy-mitchell committed Apr 18, 2023
1 parent ef1d2e9 commit 759ac4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/_helpers/verify-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import test from 'ava';
import {execa} from 'execa';

const trim = stdout => stdout.trim().split('\n').map(line => line.trim());
const trim = stdout => stdout.split('\n').map(line => line.trim());

const _verifyCli = shouldPass => test.macro(async (t, binPath, args, expectedLines) => {
const {exitCode, stdout} = await execa(binPath, [args].flat(), {reject: false});
Expand Down
2 changes: 2 additions & 0 deletions test/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const cli = path.resolve(rootDir, 'source/cli-implementation.js');

// TODO: update help text in readme
test('flags: --help', cliPasses, cli, '--help', [
'',
'A better `npm publish`',
'',
'Usage',
Expand Down Expand Up @@ -38,6 +39,7 @@ test('flags: --help', cliPasses, cli, '--help', [
'$ np 1.0.2',
'$ np 1.0.2-beta.3 --tag=beta',
'$ np 1.0.2-beta.3 --tag=beta --contents=dist',
'',
]);

test('flags: --version', cliPasses, cli, '--version', [npPkg.version]);

0 comments on commit 759ac4e

Please sign in to comment.