Skip to content

Commit 2e633cb

Browse files
test: write test case for --version flag
1 parent 5a8d859 commit 2e633cb

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

e2e/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ const matchSnapshot = async (t, arg) => {
1818

1919
test('shows help with -h flag', matchSnapshot, '-h');
2020
test('shows help with --help flag', matchSnapshot, '--help');
21-
test('shows help with -v flag', matchSnapshot, '-v');
21+
test('shows help with -v flag', matchSnapshot, '-v');
22+
test('shows help with --version flag', matchSnapshot, '--version');

e2e/index.js.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,12 @@ Generated by [AVA](https://ava.li).
8080
https://github.com/docsifyjs/docsify-cli/blob/master/CONTRIBUTING.md␊
8181
8282
[ERROR] 0 arguments passed. Please specify a command`
83+
84+
## shows help with --version flag
85+
86+
> Snapshot 1
87+
88+
`␊
89+
docsify-cli version:␊
90+
4.4.0␊
91+
`

e2e/index.js.snap

27 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)