Skip to content

Commit cb625b4

Browse files
committed
test: add command line --help test
1 parent ee7ffcc commit cb625b4

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

test/cmd.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
var path = require('path')
2+
var test = require('tape')
3+
var winSpawn = require('win-spawn')
4+
5+
var CMD_PATH = path.join(__dirname, '..', 'bin', 'cmd.js')
6+
7+
test('command line usage: --help', function (t) {
8+
t.plan(1)
9+
10+
var child = winSpawn(CMD_PATH, ['--help'])
11+
child.on('error', function (err) {
12+
t.fail(err)
13+
})
14+
child.on('close', function (code) {
15+
t.equal(code, 0, 'zero exit code')
16+
})
17+
})

0 commit comments

Comments
 (0)