Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create snapshot test for CLI help (#345)
- Loading branch information
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Packages | ||
const test = require('ava') | ||
|
||
// Utilities | ||
const generateHelp = require('../lib/help') | ||
|
||
test('generate help', t => { | ||
t.snapshot(generateHelp()) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Snapshot report for `test/help.js` | ||
|
||
The actual snapshot is saved in `help.js.snap`. | ||
|
||
Generated by [AVA](https://ava.li). | ||
|
||
## generate help | ||
|
||
> Snapshot 1 | ||
`␊ | ||
Usage: [32mmicro[0m [path] [options]␊ | ||
␊ | ||
Options:␊ | ||
␊ | ||
[32m-p, --port <n>[0m Port to listen on (defaults to 3000)␊ | ||
[32m-H, --host[0m The host on which micro will run␊ | ||
[32m-v, --version[0m Output the version number␊ | ||
[32m-h, --help[0m Show this usage information␊ | ||
` |
Binary file not shown.