From 4963d770b1d4eeb267d2b9f784db2e8d7380c1f0 Mon Sep 17 00:00:00 2001 From: Armano Date: Wed, 6 Jan 2021 06:07:08 +0100 Subject: [PATCH] test(cli): normalize difference between node console.log --- @commitlint/cli/src/cli.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/@commitlint/cli/src/cli.test.ts b/@commitlint/cli/src/cli.test.ts index f8a1e5e0494..8efb8cda1c4 100644 --- a/@commitlint/cli/src/cli.test.ts +++ b/@commitlint/cli/src/cli.test.ts @@ -479,7 +479,10 @@ test('should print version', async () => { test('should print config', async () => { const cwd = await gitBootstrap('fixtures/default'); const actual = await cli(['--print-config', '--no-color'], {cwd})(); - expect(actual.stdout).toMatchInlineSnapshot(` + const stdout = actual.stdout + .replace(/^{([^\n])/g, '{\n$1') + .replace(/[^\n]}$/g, '\n}'); + expect(stdout).toMatchInlineSnapshot(` "{ extends: [], formatter: '@commitlint/format',