Skip to content

Commit 7a5182b

Browse files
committed
test: make sure snapshot works on multiple git versions
1 parent c7923ad commit 7a5182b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

test/integration.test.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -489,13 +489,10 @@ describe('lint-staged', () => {
489489

490490
// Nothing is wrong, so a new commit is created and file is pretty
491491
expect(await execGit(['rev-list', '--count', 'HEAD'])).toEqual('4')
492-
expect(await execGit(['log', '-1', '--pretty=%B'])).toMatchInlineSnapshot(`
493-
"Merge branch 'branch-b' into master
494-
495-
# Conflicts:
496-
# test.js
497-
"
498-
`)
492+
const log = await execGit(['log', '-1', '--pretty=%B'])
493+
expect(log).toMatch(`Merge branch 'branch-b`)
494+
expect(log).toMatch(`Conflicts:`)
495+
expect(log).toMatch(`test.js`)
499496
expect(await readFile('test.js')).toEqual(fileInBranchBFixed)
500497
})
501498

0 commit comments

Comments
 (0)