fix: use new test format
MODIFY
templates/command.test.js.ejs
templates/command.test.js.ejs
@@ -6,12 +6,14 @@ describe(command, () => {
test
.stdout()
.command([command])
- .do(ctx => expect(ctx.stdout).to.equal('hello world from <%- name %>!\n'))
- .it()
+ .it('runs hello', ctx => {
+ expect(ctx.stdout).to.contain('hello world from <%- name %>!')
+ })
test
.stdout()
.command([command, '--name', 'jeff'])
- .do(ctx => expect(ctx.stdout).to.equal('hello jeff from <%- name %>!\n'))
- .it()
+ .it('runs hello --name jeff', ctx => {
+ expect(ctx.stdout).to.contain('hello jeff from <%- name %>!')
+ })
})

MODIFY
templates/command.test.ts.ejs
templates/command.test.ts.ejs
@@ -6,12 +6,14 @@ describe(command, () => {
test
.stdout()
.command([command])
- .do(ctx => expect(ctx.stdout).to.contain('hello world from <%- name %>!'))
- .it()
+ .it('runs hello', ctx => {
+ expect(ctx.stdout).to.contain('hello world from <%- name %>!')
+ })
test
.stdout()
.command([command, '--name', 'jeff'])
- .do(ctx => expect(ctx.stdout).to.contain('hello jeff from <%- name %>!'))
- .it()
+ .it('runs hello --name jeff', ctx => {
+ expect(ctx.stdout).to.contain('hello jeff from <%- name %>!')
+ })
})

MODIFY
templates/single/test/index.test.js
templates/single/test/index.test.js
@@ -5,12 +5,14 @@ describe('command', () => {
test
.stdout()
.do(() => cmd.run([]))
- .do(ctx => expect(ctx.stdout).to.equal('hello world!\n'))
- .it('says hello world!')
+ .it('says hello world!', ctx => {
+ expect(ctx.stdout).to.equal('hello world!\n')
+ })
test
.stdout()
.do(() => cmd.run(['--name', 'jeff']))
- .do(ctx => expect(ctx.stdout).to.equal('hello jeff!\n'))
- .it('says hello jeff!')
+ .it('says hello jeff!', ctx => {
+ expect(ctx.stdout).to.equal('hello jeff!\n')
+ })
})

fix: use new test format