1 | /**
|
2 | * Test for bin.
|
3 | * Runs with mocha.
|
4 | */
|
5 |
|
6 |
|
7 | const bin = require.resolve('../bin/apeman-demo-cmd')
|
8 | const cp = require('child_process')
|
9 | const assert = require('assert')
|
10 |
|
11 | describe('bin-test', () => {
|
12 | before((done) => {
|
13 | done()
|
14 | })
|
15 |
|
16 | after((done) => {
|
17 | done()
|
18 | })
|
19 |
|
20 | it('Show help.', (done) => {
|
21 | let cmd = [
|
22 | bin,
|
23 | '-h'
|
24 | ].join(' ')
|
25 | cp.exec(cmd, (err) => {
|
26 | assert.ifError(err)
|
27 | done()
|
28 | })
|
29 | })
|
30 | })
|
31 | /* global describe, before, after, it */
|