You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test('errors if generate doesn\'t have <folder> arguments',(t)=>{
70
+
test('errors if generate doesn\'t have <folder> arguments',(t,done)=>{
73
71
t.plan(2)
74
72
exec('node generate-plugin.js',(err,stdout)=>{
75
-
t.equal('must specify a directory to \'fastify generate\'',strip(stdout.toString().trim()))
76
-
t.equal(1,err.code)
73
+
t.assert.strictEqual('must specify a directory to \'fastify generate\'',strip(stdout.toString().trim()))
74
+
t.assert.strictEqual(1,err.code)
75
+
done()
77
76
})
78
77
})
79
78
80
-
test('errors if package.json exists when use generate .',(t)=>{
79
+
test('errors if package.json exists when use generate .',(t,done)=>{
81
80
t.plan(2)
82
81
exec('node generate-plugin.js .',(err,stdout)=>{
83
-
t.equal('a package.json file already exists in target directory. retry with the --integrate flag to proceed',strip(stdout.toString().trim()))
84
-
t.equal(1,err.code)
82
+
t.assert.strictEqual('a package.json file already exists in target directory. retry with the --integrate flag to proceed',strip(stdout.toString().trim()))
83
+
t.assert.strictEqual(1,err.code)
84
+
done()
85
85
})
86
86
})
87
87
88
-
test('errors if package.json exists when use generate ./',(t)=>{
88
+
test('errors if package.json exists when use generate ./',(t,done)=>{
89
89
t.plan(2)
90
90
exec('node generate-plugin.js ./',(err,stdout)=>{
91
-
t.equal('a package.json file already exists in target directory. retry with the --integrate flag to proceed',strip(stdout.toString().trim()))
92
-
t.equal(1,err.code)
91
+
t.assert.strictEqual('a package.json file already exists in target directory. retry with the --integrate flag to proceed',strip(stdout.toString().trim()))
0 commit comments