Skip to content

Commit e01c4c5

Browse files
committed
test: specify merge conflict style for snapshots
1 parent a118817 commit e01c4c5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/integration.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,8 @@ describe('lint-staged', () => {
500500
})
501501

502502
it('should handle merge conflicts', async () => {
503+
await execGit(['config', 'merge.conflictstyle', 'merge'])
504+
503505
const fileInBranchA = `module.exports = "foo";\n`
504506
const fileInBranchB = `module.exports = 'bar'\n`
505507
const fileInBranchBFixed = `module.exports = "bar";\n`
@@ -561,6 +563,8 @@ describe('lint-staged', () => {
561563
})
562564

563565
it('should handle merge conflict when task errors', async () => {
566+
await execGit(['config', 'merge.conflictstyle', 'merge'])
567+
564568
const fileInBranchA = `module.exports = "foo";\n`
565569
const fileInBranchB = `module.exports = 'bar'\n`
566570
const fileInBranchBFixed = `module.exports = "bar";\n`
@@ -1000,6 +1004,8 @@ describe('lint-staged', () => {
10001004
})
10011005

10021006
it('should abort commit without reverting with --no-stash 1', async () => {
1007+
await execGit(['config', 'merge.conflictstyle', 'merge'])
1008+
10031009
// Stage file
10041010
await appendFile('test.js', testJsFileUgly)
10051011
await execGit(['add', 'test.js'])

0 commit comments

Comments
 (0)