Skip to content

Commit

Permalink
Create snapshot test for CLI help (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmiras authored and leo committed Mar 28, 2018
1 parent 888b46e commit 43c39fb
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/help.js
@@ -0,0 +1,9 @@
// Packages
const test = require('ava')

// Utilities
const generateHelp = require('../lib/help')

test('generate help', t => {
t.snapshot(generateHelp())
})
20 changes: 20 additions & 0 deletions test/snapshots/help.js.md
@@ -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: micro [path] [options]␊
Options:␊
-p, --port <n> Port to listen on (defaults to 3000)␊
-H, --host The host on which micro will run␊
-v, --version Output the version number␊
-h, --help Show this usage information␊
`
Binary file added test/snapshots/help.js.snap
Binary file not shown.

0 comments on commit 43c39fb

Please sign in to comment.