@@ -69,7 +69,7 @@ test('should produce help for problems', async () => {
69
69
const cwd = await gitBootstrap ( 'fixtures/default' ) ;
70
70
const actual = await cli ( [ ] , { cwd} ) ( 'foo: bar' ) ;
71
71
expect ( actual . stdout ) . toContain (
72
- 'Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint' ,
72
+ 'Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint'
73
73
) ;
74
74
expect ( actual . exitCode ) . toBe ( 1 ) ;
75
75
} ) ;
@@ -78,10 +78,10 @@ test('should produce help for problems with correct helpurl', async () => {
78
78
const cwd = await gitBootstrap ( 'fixtures/default' ) ;
79
79
const actual = await cli (
80
80
[ '-H https://github.com/conventional-changelog/commitlint/#testhelpurl' ] ,
81
- { cwd} ,
81
+ { cwd}
82
82
) ( 'foo: bar' ) ;
83
83
expect ( actual . stdout ) . toContain (
84
- 'Get help: https://github.com/conventional-changelog/commitlint/#testhelpurl' ,
84
+ 'Get help: https://github.com/conventional-changelog/commitlint/#testhelpurl'
85
85
) ;
86
86
expect ( actual . exitCode ) . toBe ( 1 ) ;
87
87
} ) ;
@@ -152,7 +152,7 @@ test('should work with husky commitmsg hook and git commit', async () => {
152
152
const commit = await execa (
153
153
'git' ,
154
154
[ 'commit' , '-m' , '"test: this should work"' ] ,
155
- { cwd} ,
155
+ { cwd}
156
156
) ;
157
157
158
158
expect ( commit ) . toBeTruthy ( ) ;
@@ -168,7 +168,7 @@ test('should work with husky commitmsg hook in sub packages', async () => {
168
168
const commit = await execa (
169
169
'git' ,
170
170
[ 'commit' , '-m' , '"test: this should work"' ] ,
171
- { cwd} ,
171
+ { cwd}
172
172
) ;
173
173
expect ( commit ) . toBeTruthy ( ) ;
174
174
} ) ;
@@ -177,15 +177,15 @@ test('should work with husky via commitlint -e $GIT_PARAMS', async () => {
177
177
const cwd = await gitBootstrap ( 'fixtures/husky/integration' ) ;
178
178
await writePkg (
179
179
{ husky : { hooks : { 'commit-msg' : `'${ bin } ' -e $GIT_PARAMS` } } } ,
180
- { cwd} ,
180
+ { cwd}
181
181
) ;
182
182
183
183
// await execa('npm', ['install'], {cwd}); // npm install is failing on windows machines
184
184
await execa ( 'git' , [ 'add' , 'package.json' ] , { cwd} ) ;
185
185
const commit = await execa (
186
186
'git' ,
187
187
[ 'commit' , '-m' , '"test: this should work"' ] ,
188
- { cwd} ,
188
+ { cwd}
189
189
) ;
190
190
expect ( commit ) . toBeTruthy ( ) ;
191
191
} ) ;
@@ -194,15 +194,15 @@ test('should work with husky via commitlint -e %GIT_PARAMS%', async () => {
194
194
const cwd = await gitBootstrap ( 'fixtures/husky/integration' ) ;
195
195
await writePkg (
196
196
{ husky : { hooks : { 'commit-msg' : `'${ bin } ' -e %GIT_PARAMS%` } } } ,
197
- { cwd} ,
197
+ { cwd}
198
198
) ;
199
199
200
200
// await execa('npm', ['install'], {cwd}); // npm install is failing on windows machines
201
201
await execa ( 'git' , [ 'add' , 'package.json' ] , { cwd} ) ;
202
202
const commit = await execa (
203
203
'git' ,
204
204
[ 'commit' , '-m' , '"test: this should work"' ] ,
205
- { cwd} ,
205
+ { cwd}
206
206
) ;
207
207
expect ( commit ) . toBeTruthy ( ) ;
208
208
} ) ;
@@ -211,15 +211,15 @@ test('should work with husky via commitlint -e $HUSKY_GIT_PARAMS', async () => {
211
211
const cwd = await gitBootstrap ( 'fixtures/husky/integration' ) ;
212
212
await writePkg (
213
213
{ husky : { hooks : { 'commit-msg' : `'${ bin } ' -e $HUSKY_GIT_PARAMS` } } } ,
214
- { cwd} ,
214
+ { cwd}
215
215
) ;
216
216
217
217
// await execa('npm', ['install'], {cwd}); // npm install is failing on windows machines
218
218
await execa ( 'git' , [ 'add' , 'package.json' ] , { cwd} ) ;
219
219
const commit = await execa (
220
220
'git' ,
221
221
[ 'commit' , '-m' , '"test: this should work"' ] ,
222
- { cwd} ,
222
+ { cwd}
223
223
) ;
224
224
expect ( commit ) . toBeTruthy ( ) ;
225
225
} ) ;
@@ -228,15 +228,15 @@ test('should work with husky via commitlint -e %HUSKY_GIT_PARAMS%', async () =>
228
228
const cwd = await gitBootstrap ( 'fixtures/husky/integration' ) ;
229
229
await writePkg (
230
230
{ husky : { hooks : { 'commit-msg' : `'${ bin } ' -e %HUSKY_GIT_PARAMS%` } } } ,
231
- { cwd} ,
231
+ { cwd}
232
232
) ;
233
233
234
234
// await execa('npm', ['install'], {cwd}); // npm install is failing on windows machines
235
235
await execa ( 'git' , [ 'add' , 'package.json' ] , { cwd} ) ;
236
236
const commit = await execa (
237
237
'git' ,
238
238
[ 'commit' , '-m' , '"test: this should work"' ] ,
239
- { cwd} ,
239
+ { cwd}
240
240
) ;
241
241
expect ( commit ) . toBeTruthy ( ) ;
242
242
} ) ;
@@ -255,7 +255,7 @@ test('should allow reading of environment variables for edit file, failing if in
255
255
const cwd = await gitBootstrap ( 'fixtures/simple' ) ;
256
256
await fs . writeFile (
257
257
path . join ( cwd , 'commit-msg-file' ) ,
258
- 'foo: bar\n\nFoo bar bizz buzz.\n\nCloses #123.' ,
258
+ 'foo: bar\n\nFoo bar bizz buzz.\n\nCloses #123.'
259
259
) ;
260
260
const actual = await cli ( [ '--env' , 'variable' ] , {
261
261
cwd,
@@ -267,7 +267,7 @@ test('should allow reading of environment variables for edit file, failing if in
267
267
test ( 'should pick up parser preset and fail accordingly' , async ( ) => {
268
268
const cwd = await gitBootstrap ( 'fixtures/parser-preset' ) ;
269
269
const actual = await cli ( [ '--parser-preset' , './parser-preset' ] , { cwd} ) (
270
- 'type(scope): subject' ,
270
+ 'type(scope): subject'
271
271
) ;
272
272
expect ( actual . exitCode ) . toBe ( 1 ) ;
273
273
expect ( actual . stdout ) . toContain ( 'may not be empty' ) ;
@@ -276,7 +276,7 @@ test('should pick up parser preset and fail accordingly', async () => {
276
276
test ( 'should pick up parser preset and succeed accordingly' , async ( ) => {
277
277
const cwd = await gitBootstrap ( 'fixtures/parser-preset' ) ;
278
278
const actual = await cli ( [ '--parser-preset' , './parser-preset' ] , { cwd} ) (
279
- '----type(scope): subject' ,
279
+ '----type(scope): subject'
280
280
) ;
281
281
expect ( actual . exitCode ) . toBe ( 0 ) ;
282
282
} ) ;
@@ -322,7 +322,7 @@ test('should handle --amend with signoff', async () => {
322
322
await execa (
323
323
'git' ,
324
324
[ 'commit' , '-m' , '"test: this should work"' , '--signoff' ] ,
325
- { cwd} ,
325
+ { cwd}
326
326
) ;
327
327
const commit = await execa ( 'git' , [ 'commit' , '--amend' , '--no-edit' ] , { cwd} ) ;
328
328
@@ -342,7 +342,7 @@ test("it doesn't use parserOpts.commentChar when using edit mode", async () => {
342
342
const cwd = await gitBootstrap ( 'fixtures/comment-char' ) ;
343
343
await fs . writeFile (
344
344
path . join ( cwd , '.git' , 'COMMIT_EDITMSG' ) ,
345
- 'header: foo\n\n$body\n' ,
345
+ 'header: foo\n\n$body\n'
346
346
) ;
347
347
348
348
const actual = await cli ( [ '--edit' , '.git/COMMIT_EDITMSG' ] , { cwd} ) ( ) ;
@@ -355,7 +355,7 @@ test('it uses core.commentChar git config when using edit mode', async () => {
355
355
await execa ( 'git' , [ 'config' , '--local' , 'core.commentChar' , '$' ] , { cwd} ) ;
356
356
await fs . writeFile (
357
357
path . join ( cwd , '.git' , 'COMMIT_EDITMSG' ) ,
358
- 'header: foo\n\n$body\n' ,
358
+ 'header: foo\n\n$body\n'
359
359
) ;
360
360
361
361
const actual = await cli ( [ '--edit' , '.git/COMMIT_EDITMSG' ] , { cwd} ) ( ) ;
@@ -367,7 +367,7 @@ test('it falls back to # for core.commentChar when using edit mode', async () =>
367
367
const cwd = await gitBootstrap ( 'fixtures/comment-char' ) ;
368
368
await fs . writeFile (
369
369
path . join ( cwd , '.git' , 'COMMIT_EDITMSG' ) ,
370
- 'header: foo\n\n#body\n' ,
370
+ 'header: foo\n\n#body\n'
371
371
) ;
372
372
373
373
const actual = await cli ( [ '--edit' , '.git/COMMIT_EDITMSG' ] , { cwd} ) ( ) ;
@@ -408,7 +408,7 @@ test('should fail for invalid formatters from configuration', async () => {
408
408
const actual = await cli ( [ ] , { cwd} ) ( 'foo: bar' ) ;
409
409
410
410
expect ( actual . stderr ) . toContain (
411
- 'Using format custom-formatter, but cannot find the module' ,
411
+ 'Using format custom-formatter, but cannot find the module'
412
412
) ;
413
413
expect ( actual . stdout ) . toEqual ( '' ) ;
414
414
expect ( actual . exitCode ) . toBe ( 1 ) ;
@@ -449,7 +449,7 @@ test('should fail for invalid formatters from flags', async () => {
449
449
const actual = await cli ( [ '--format' , 'through-flag' ] , { cwd} ) ( 'foo: bar' ) ;
450
450
451
451
expect ( actual . stderr ) . toContain (
452
- 'Using format through-flag, but cannot find the module' ,
452
+ 'Using format through-flag, but cannot find the module'
453
453
) ;
454
454
expect ( actual . stdout ) . toEqual ( '' ) ;
455
455
expect ( actual . exitCode ) . toBe ( 1 ) ;
@@ -458,11 +458,11 @@ test('should fail for invalid formatters from flags', async () => {
458
458
test ( 'should work with absolute formatter path' , async ( ) => {
459
459
const formatterPath = path . resolve (
460
460
__dirname ,
461
- '../fixtures/custom-formatter/formatters/custom.js' ,
461
+ '../fixtures/custom-formatter/formatters/custom.js'
462
462
) ;
463
463
const cwd = await gitBootstrap ( 'fixtures/custom-formatter' ) ;
464
464
const actual = await cli ( [ '--format' , formatterPath ] , { cwd} ) (
465
- 'test: this should work' ,
465
+ 'test: this should work'
466
466
) ;
467
467
468
468
expect ( actual . stdout ) . toContain ( 'custom-formatter-ok' ) ;
@@ -472,10 +472,10 @@ test('should work with absolute formatter path', async () => {
472
472
test ( 'should work with relative formatter path' , async ( ) => {
473
473
const cwd = path . resolve (
474
474
await gitBootstrap ( 'fixtures/custom-formatter' ) ,
475
- './formatters' ,
475
+ './formatters'
476
476
) ;
477
477
const actual = await cli ( [ '--format' , './custom.js' ] , { cwd} ) (
478
- 'test: this should work' ,
478
+ 'test: this should work'
479
479
) ;
480
480
481
481
expect ( actual . stdout ) . toContain ( 'custom-formatter-ok' ) ;
0 commit comments