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)=>{
79
+
test('errors if generate doesn\'t have <folder> arguments',(t,done)=>{
82
80
t.plan(2)
83
81
exec('node generate.js --esm',(err,stdout)=>{
84
-
t.equal('must specify a directory to \'fastify generate\'',strip(stdout.toString().trim()))
85
-
t.equal(1,err.code)
82
+
t.assert.strictEqual('must specify a directory to \'fastify generate\'',strip(stdout.toString().trim()))
83
+
t.assert.strictEqual(1,err.code)
84
+
done()
86
85
})
87
86
})
88
87
89
-
test('errors if package.json exists when use generate . and integrate flag is not set',(t)=>{
88
+
test('errors if package.json exists when use generate . and integrate flag is not set',(t,done)=>{
90
89
t.plan(2)
91
90
exec('node generate.js . --esm',(err,stdout)=>{
92
-
t.equal('a package.json file already exists in target directory. retry with the --integrate flag to proceed',strip(stdout.toString().trim()))
93
-
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()))
92
+
t.assert.strictEqual(1,err.code)
93
+
done()
94
94
})
95
95
})
96
96
97
-
test('errors if package.json exists when use generate ./ and integrate flag is not set',(t)=>{
97
+
test('errors if package.json exists when use generate ./ and integrate flag is not set',(t,done)=>{
98
98
t.plan(2)
99
99
exec('node generate.js ./ --esm',(err,stdout)=>{
100
-
t.equal('a package.json file already exists in target directory. retry with the --integrate flag to proceed',strip(stdout.toString().trim()))
101
-
t.equal(1,err.code)
100
+
t.assert.strictEqual('a package.json file already exists in target directory. retry with the --integrate flag to proceed',strip(stdout.toString().trim()))
101
+
t.assert.strictEqual(1,err.code)
102
+
done()
102
103
})
103
104
})
104
105
105
-
test('errors if folder exists',(t)=>{
106
+
test('errors if folder exists',(t,done)=>{
106
107
t.plan(2)
107
108
exec('node generate.js test --esm',(err,stdout)=>{
108
-
t.equal('directory test already exists',strip(stdout.toString().trim()))
109
-
t.equal(1,err.code)
109
+
t.assert.strictEqual('directory test already exists',strip(stdout.toString().trim()))
0 commit comments