@@ -115,7 +115,7 @@ test('should produce help for problems', async () => {
115115 const result = cli ( [ ] , { cwd} ) ( 'foo: bar' ) ;
116116 const output = await result ;
117117 expect ( output . stdout . trim ( ) ) . toContain (
118- 'Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint'
118+ 'Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint' ,
119119 ) ;
120120 expect ( result . exitCode ) . toBe ( ExitCode . CommitlintErrorDefault ) ;
121121} ) ;
@@ -124,11 +124,11 @@ test('should produce help for problems with correct helpurl', async () => {
124124 const cwd = await gitBootstrap ( 'fixtures/default' ) ;
125125 const result = cli (
126126 [ '-H https://github.com/conventional-changelog/commitlint/#testhelpurl' ] ,
127- { cwd}
127+ { cwd} ,
128128 ) ( 'foo: bar' ) ;
129129 const output = await result ;
130130 expect ( output . stdout . trim ( ) ) . toContain (
131- 'Get help: https://github.com/conventional-changelog/commitlint/#testhelpurl'
131+ 'Get help: https://github.com/conventional-changelog/commitlint/#testhelpurl' ,
132132 ) ;
133133 expect ( result . exitCode ) . toBe ( ExitCode . CommitlintErrorDefault ) ;
134134} ) ;
@@ -177,7 +177,7 @@ test('should output help URL defined in config file', async () => {
177177 const result = cli ( [ ] , { cwd} ) ( 'foo: bar' ) ;
178178 const output = await result ;
179179 expect ( output . stdout . trim ( ) ) . toContain (
180- 'Get help: https://www.example.com/foo'
180+ 'Get help: https://www.example.com/foo' ,
181181 ) ;
182182 expect ( result . exitCode ) . toBe ( ExitCode . CommitlintErrorDefault ) ;
183183} ) ;
@@ -230,7 +230,7 @@ test('should work with husky via commitlint -e $GIT_PARAMS', async () => {
230230 const cwd = await gitBootstrap ( 'fixtures/husky/integration' ) ;
231231 await writePkg (
232232 { husky : { hooks : { 'commit-msg' : `'${ bin } ' -e $GIT_PARAMS` } } } ,
233- { cwd}
233+ { cwd} ,
234234 ) ;
235235
236236 // await x('npm', ['install'], { nodeOptions: {cwd}}); // npm install is failing on windows machines
@@ -245,7 +245,7 @@ test('should work with husky via commitlint -e %GIT_PARAMS%', async () => {
245245 const cwd = await gitBootstrap ( 'fixtures/husky/integration' ) ;
246246 await writePkg (
247247 { husky : { hooks : { 'commit-msg' : `'${ bin } ' -e %GIT_PARAMS%` } } } ,
248- { cwd}
248+ { cwd} ,
249249 ) ;
250250
251251 // await x('npm', ['install'], { nodeOptions: {cwd}}); // npm install is failing on windows machines
@@ -260,7 +260,7 @@ test('should work with husky via commitlint -e $HUSKY_GIT_PARAMS', async () => {
260260 const cwd = await gitBootstrap ( 'fixtures/husky/integration' ) ;
261261 await writePkg (
262262 { husky : { hooks : { 'commit-msg' : `'${ bin } ' -e $HUSKY_GIT_PARAMS` } } } ,
263- { cwd}
263+ { cwd} ,
264264 ) ;
265265
266266 // await x('npm', ['install'], { nodeOptions: {cwd}}); // npm install is failing on windows machines
@@ -275,7 +275,7 @@ test('should work with husky via commitlint -e %HUSKY_GIT_PARAMS%', async () =>
275275 const cwd = await gitBootstrap ( 'fixtures/husky/integration' ) ;
276276 await writePkg (
277277 { husky : { hooks : { 'commit-msg' : `'${ bin } ' -e %HUSKY_GIT_PARAMS%` } } } ,
278- { cwd}
278+ { cwd} ,
279279 ) ;
280280
281281 // await x('npm', ['install'], { nodeOptions: {cwd}}); // npm install is failing on windows machines
@@ -301,7 +301,7 @@ test('should allow reading of environment variables for edit file, failing if in
301301 const cwd = await gitBootstrap ( 'fixtures/simple' ) ;
302302 await fs . writeFile (
303303 path . join ( cwd , 'commit-msg-file' ) ,
304- 'foo: bar\n\nFoo bar bizz buzz.\n\nCloses #123.'
304+ 'foo: bar\n\nFoo bar bizz buzz.\n\nCloses #123.' ,
305305 ) ;
306306 const result = cli ( [ '--env' , 'variable' ] , {
307307 cwd,
@@ -314,7 +314,7 @@ test('should allow reading of environment variables for edit file, failing if in
314314test ( 'should pick up parser preset and fail accordingly' , async ( ) => {
315315 const cwd = await gitBootstrap ( 'fixtures/parser-preset' ) ;
316316 const result = cli ( [ '--parser-preset' , './parser-preset' ] , { cwd} ) (
317- 'type(scope): subject'
317+ 'type(scope): subject' ,
318318 ) ;
319319 const output = await result ;
320320 expect ( output . stdout . trim ( ) ) . toContain ( 'may not be empty' ) ;
@@ -324,7 +324,7 @@ test('should pick up parser preset and fail accordingly', async () => {
324324test ( 'should pick up parser preset and succeed accordingly' , async ( ) => {
325325 const cwd = await gitBootstrap ( 'fixtures/parser-preset' ) ;
326326 const result = cli ( [ '--parser-preset' , './parser-preset' ] , { cwd} ) (
327- '----type(scope): subject'
327+ '----type(scope): subject' ,
328328 ) ;
329329 await result ;
330330 expect ( result . exitCode ) . toBe ( ExitCode . CommitlintDefault ) ;
@@ -396,7 +396,7 @@ test("it doesn't use parserOpts.commentChar when using edit mode", async () => {
396396 const cwd = await gitBootstrap ( 'fixtures/comment-char' ) ;
397397 await fs . writeFile (
398398 path . join ( cwd , '.git' , 'COMMIT_EDITMSG' ) ,
399- 'header: foo\n\n$body\n'
399+ 'header: foo\n\n$body\n' ,
400400 ) ;
401401
402402 const result = cli ( [ '--edit' , '.git/COMMIT_EDITMSG' ] , { cwd} ) ( ) ;
@@ -412,7 +412,7 @@ test('it uses core.commentChar git config when using edit mode', async () => {
412412 } ) ;
413413 await fs . writeFile (
414414 path . join ( cwd , '.git' , 'COMMIT_EDITMSG' ) ,
415- 'header: foo\n\n$body\n'
415+ 'header: foo\n\n$body\n' ,
416416 ) ;
417417
418418 const result = cli ( [ '--edit' , '.git/COMMIT_EDITMSG' ] , { cwd} ) ( ) ;
@@ -425,7 +425,7 @@ test('it falls back to # for core.commentChar when using edit mode', async () =>
425425 const cwd = await gitBootstrap ( 'fixtures/comment-char' ) ;
426426 await fs . writeFile (
427427 path . join ( cwd , '.git' , 'COMMIT_EDITMSG' ) ,
428- 'header: foo\n\n#body\n'
428+ 'header: foo\n\n#body\n' ,
429429 ) ;
430430
431431 const result = cli ( [ '--edit' , '.git/COMMIT_EDITMSG' ] , { cwd} ) ( ) ;
@@ -468,7 +468,7 @@ test('should fail for invalid formatters from configuration', async () => {
468468 const result = cli ( [ ] , { cwd} ) ( 'foo: bar' ) ;
469469 const output = await result ;
470470 expect ( output . stderr ) . toContain (
471- 'Using format custom-formatter, but cannot find the module'
471+ 'Using format custom-formatter, but cannot find the module' ,
472472 ) ;
473473 expect ( output . stdout . trim ( ) ) . toEqual ( '' ) ;
474474 expect ( result . exitCode ) . toBe ( ExitCode . CommitlintErrorDefault ) ;
@@ -514,7 +514,7 @@ test('should fail for invalid formatters from flags', async () => {
514514 const result = cli ( [ '--format' , 'through-flag' ] , { cwd} ) ( 'foo: bar' ) ;
515515 const output = await result ;
516516 expect ( output . stderr ) . toContain (
517- 'Using format through-flag, but cannot find the module'
517+ 'Using format through-flag, but cannot find the module' ,
518518 ) ;
519519 expect ( output . stdout . trim ( ) ) . toEqual ( '' ) ;
520520 expect ( result . exitCode ) . toBe ( ExitCode . CommitlintErrorDefault ) ;
@@ -523,11 +523,11 @@ test('should fail for invalid formatters from flags', async () => {
523523test ( 'should work with absolute formatter path' , async ( ) => {
524524 const formatterPath = path . resolve (
525525 __dirname ,
526- '../fixtures/custom-formatter/formatters/custom.js'
526+ '../fixtures/custom-formatter/formatters/custom.js' ,
527527 ) ;
528528 const cwd = await gitBootstrap ( 'fixtures/custom-formatter' ) ;
529529 const result = cli ( [ '--format' , formatterPath ] , { cwd} ) (
530- 'test: this should work'
530+ 'test: this should work' ,
531531 ) ;
532532 const output = await result ;
533533 expect ( output . stdout . trim ( ) ) . toContain ( 'custom-formatter-ok' ) ;
@@ -537,10 +537,10 @@ test('should work with absolute formatter path', async () => {
537537test ( 'should work with relative formatter path' , async ( ) => {
538538 const cwd = path . resolve (
539539 await gitBootstrap ( 'fixtures/custom-formatter' ) ,
540- './formatters'
540+ './formatters' ,
541541 ) ;
542542 const result = cli ( [ '--format' , './custom.js' ] , { cwd} ) (
543- 'test: this should work'
543+ 'test: this should work' ,
544544 ) ;
545545 const output = await result ;
546546 expect ( output . stdout . trim ( ) ) . toContain ( 'custom-formatter-ok' ) ;
@@ -665,7 +665,7 @@ describe('should print config', () => {
665665 const result = cli ( [ '--print-config=json' , '--no-color' ] , { cwd} ) ( ) ;
666666 const output = await result ;
667667 expect ( output . stdout . trim ( ) ) . toMatchInlineSnapshot (
668- `"{"extends":[],"formatter":"@commitlint/format","plugins":{},"rules":{"type-enum":[2,"never",["foo"]]},"helpUrl":"https://github.com/conventional-changelog/commitlint/#what-is-commitlint","prompt":{}}"`
668+ `"{"extends":[],"formatter":"@commitlint/format","plugins":{},"rules":{"type-enum":[2,"never",["foo"]]},"helpUrl":"https://github.com/conventional-changelog/commitlint/#what-is-commitlint","prompt":{}}"` ,
669669 ) ;
670670 } ) ;
671671} ) ;
0 commit comments