Skip to content

Commit e61fc35

Browse files
committed
test(cli): normalize difference between node console.log
1 parent cb10049 commit e61fc35

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

@commitlint/cli/src/cli.test.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,11 @@ test('should print version', async () => {
479479
test('should print config', async () => {
480480
const cwd = await gitBootstrap('fixtures/default');
481481
const actual = await cli(['--print-config', '--no-color'], {cwd})();
482-
expect(actual.stdout).toMatchInlineSnapshot(`
482+
const stdout = actual.stdout
483+
.replace(/^{[^\n]/g, '{\n ')
484+
.replace(/[^\n]}$/g, '\n}')
485+
.replace(/(helpUrl:)\n[ ]+/, '$1 ');
486+
expect(stdout).toMatchInlineSnapshot(`
483487
"{
484488
extends: [],
485489
formatter: '@commitlint/format',

0 commit comments

Comments
 (0)