const {expect, test} = require('@anycli/test') <%_ if (type === 'single') { _%> const cmd = require('..') <%_ } _%> const command = '<%- name %>' describe(command, () => { test .stdout() <%_ if (type === 'single') { _%> .do(() => cmd.run([])) <%_ } else { _%> .command([command]) <%_ } _%> .it('runs hello', ctx => { expect(ctx.stdout).to.contain('hello world from <%- name %>!') }) test .stdout() <%_ if (type === 'single') { _%> .do(() => cmd.run(['--name', 'jeff'])) <%_ } else { _%> .command([command, '--name', 'jeff']) <%_ } _%> .it('runs hello --name jeff', ctx => { expect(ctx.stdout).to.contain('hello jeff from <%- name %>!') }) })