UNPKG

495 BJavaScriptView Raw
1/**
2 * Test for bin.
3 * Runs with mocha.
4 */
5'use strict'
6
7const bin = require.resolve('../bin/apeman-demo-cmd')
8const cp = require('child_process')
9const assert = require('assert')
10
11describe('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 */