create-dxcli
Version:
dxcli: create your own CLI
18 lines (14 loc) • 388 B
text/typescript
import {expect, test} from '@dxcli/test'
import cmd from '../src'
describe('command', () => {
test
.stdout()
.do(() => cmd.run([]))
.do(output => expect(output.stdout).to.equal('hello world!\n'))
.it('says hello world!')
test
.stdout()
.do(() => cmd.run(['--name', 'jeff']))
.do(output => expect(output.stdout).to.equal('hello jeff!\n'))
.it('says hello jeff!')
})