From e01c4c5869ae2803fc936549d301052ee5174a0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iiro=20J=C3=A4ppinen?= Date: Sun, 17 Apr 2022 11:11:47 +0300 Subject: [PATCH] test: specify merge conflict style for snapshots --- test/integration.test.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/integration.test.js b/test/integration.test.js index 1fb4cb52e..6c0064daa 100644 --- a/test/integration.test.js +++ b/test/integration.test.js @@ -500,6 +500,8 @@ describe('lint-staged', () => { }) it('should handle merge conflicts', async () => { + await execGit(['config', 'merge.conflictstyle', 'merge']) + const fileInBranchA = `module.exports = "foo";\n` const fileInBranchB = `module.exports = 'bar'\n` const fileInBranchBFixed = `module.exports = "bar";\n` @@ -561,6 +563,8 @@ describe('lint-staged', () => { }) it('should handle merge conflict when task errors', async () => { + await execGit(['config', 'merge.conflictstyle', 'merge']) + const fileInBranchA = `module.exports = "foo";\n` const fileInBranchB = `module.exports = 'bar'\n` const fileInBranchBFixed = `module.exports = "bar";\n` @@ -1000,6 +1004,8 @@ describe('lint-staged', () => { }) it('should abort commit without reverting with --no-stash 1', async () => { + await execGit(['config', 'merge.conflictstyle', 'merge']) + // Stage file await appendFile('test.js', testJsFileUgly) await execGit(['add', 'test.js'])