Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ test('shows up help message without any args', async t => {
const { stdout } = await execa(rootCommand);
t.snapshot(stdout);
});

['-V', '--version'].forEach(function(i) {
test('shows version with arg ' + i, async t => {
const { stdout } = await execa(rootCommand, [i]);
t.snapshot(stdout);
});
});
24 changes: 24 additions & 0 deletions test/snapshots/index.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,27 @@ Generated by [AVA](https://ava.li).
fetchtask <key> Fetches any task as per the key supplied␊
showkeys Shows keys of all the completed tasks␊
showcommands Shows all commands available`

## shows help message with arg --version

> Snapshot 1

'1.1.8'

## shows help message with arg -V

> Snapshot 1

'1.1.8'

## shows version with arg --version

> Snapshot 1

'1.1.8'

## shows version with arg -V

> Snapshot 1

'1.1.8'
Binary file modified test/snapshots/index.js.snap
Binary file not shown.