Skip to content

Commit

Permalink
test: make sure snapshot works on multiple git versions
Browse files Browse the repository at this point in the history
  • Loading branch information
iiroj committed Aug 24, 2020
1 parent 94a7dfc commit dd036c9
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions test/integration.test.js
Expand Up @@ -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)
})

Expand Down

0 comments on commit dd036c9

Please sign in to comment.