Skip to content

Commit

Permalink
Update test output
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenlouv committed Mar 19, 2022
1 parent 80a741a commit 163f278
Showing 1 changed file with 13 additions and 25 deletions.
38 changes: 13 additions & 25 deletions src/test/e2e/cli/entrypoint.cli.private.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,35 +293,23 @@ describe('entrypoint cli', () => {
}
);

//@ts-expect-error
const lineToReplace = output.match(
/Conflicting files:[\s]+- (.*[\s].*)la-liga.md/
)[1];
// //@ts-expect-error
// const lineToReplace = output.match(
// /Conflicting files:[\s]+- (.*[\s].*)la-liga.md/
// )[1];

// const lineWithoutBreaks = lineToReplace.replace(/\s/g, '');
// const outputReplaced = output
// .replace(lineToReplace, lineWithoutBreaks)
// .replaceAll(backportDir, '<BACKPORT_DIR>');

const lineWithoutBreaks = lineToReplace.replace(/\s/g, '');
const outputReplaced = output
.replace(lineToReplace, lineWithoutBreaks)
.replaceAll('\n', '')
.replaceAll(backportDir, '<BACKPORT_DIR>');

expect(outputReplaced).toMatchInlineSnapshot(`
"Backporting to 7.x:
The commit could not be backported due to conflicts
Please fix the conflicts in <BACKPORT_DIR>
Hint: Before fixing the conflicts manually you should consider backporting the following pull requests to \\"7.x\\":
- Change Barca to Braithwaite (#8) (backport missing)
https://github.com/backport-org/repo-with-conflicts/pull/8
? Fix the following conflicts manually:
Conflicting files:
- <BACKPORT_DIR>/la-liga.md
Press ENTER when the conflicts are resolved and files are staged (Y/n)"
`);
expect(outputReplaced).toMatchInlineSnapshot(
`"Backporting to 7.x:The commit could not be backported due to conflictsPlease fix the conflicts in <BACKPORT_DIR>Hint: Before fixing the conflicts manually you should consider backporting the following pull requests to \\"7.x\\": - Change Barca to Braithwaite (#8) (backport missing) https://github.com/backport-org/repo-with-conflicts/pull/8? Fix the following conflicts manually:Conflicting files: - <BACKPORT_DIR>/la-liga.mdPress ENTER when the conflicts are resolved and files are staged (Y/n)"`
);
});
});

Expand Down

0 comments on commit 163f278

Please sign in to comment.