From dd036c9ae919c8ac4007655117992d2ea2d460a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iiro=20J=C3=A4ppinen?= Date: Mon, 24 Aug 2020 20:54:42 +0300 Subject: [PATCH] test: make sure snapshot works on multiple git versions --- test/integration.test.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/test/integration.test.js b/test/integration.test.js index 725685fee..33f4f0681 100644 --- a/test/integration.test.js +++ b/test/integration.test.js @@ -489,13 +489,10 @@ describe('lint-staged', () => { // Nothing is wrong, so a new commit is created and file is pretty expect(await execGit(['rev-list', '--count', 'HEAD'])).toEqual('4') - expect(await execGit(['log', '-1', '--pretty=%B'])).toMatchInlineSnapshot(` - "Merge branch 'branch-b' into master - - # Conflicts: - # test.js - " - `) + const log = await execGit(['log', '-1', '--pretty=%B']) + expect(log).toMatch(`Merge branch 'branch-b`) + expect(log).toMatch(`Conflicts:`) + expect(log).toMatch(`test.js`) expect(await readFile('test.js')).toEqual(fileInBranchBFixed) })