Skip to content

Commit 4963d77

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

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,10 @@ 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$1')
484+
.replace(/[^\n]}$/g, '\n}');
485+
expect(stdout).toMatchInlineSnapshot(`
483486
"{
484487
extends: [],
485488
formatter: '@commitlint/format',

0 commit comments

Comments
 (0)