Skip to content

Commit

Permalink
fix commitEntry test regex
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmayer committed Feb 24, 2023
1 parent add2254 commit 6e93826
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/git.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,16 @@ describe('git', () => {
expect(parts[0]).toMatch(/^commit [a-f0-9]+$/);
if (parts.length === 7) {
expect(parts[1]).toMatch(/^Merge: [a-f0-9]+ [a-f0-9]+$/);
expect(parts[2]).toMatch(/^Author: [^\<\>]+ \<[\w\.]+@[\w\.]+\>$/);
expect(parts[2]).toMatch(
/^Author: [^\<\>]+ \<[A-Za-z0-9._+\-]+@[\w\.]+\>$/
);
expect(parts[3]).toMatch(/^Date: .+$/);
expect(parts[4]).toBe('');
expect(parts[5]).toMatch(/^\s{4}.+$/);
} else {
expect(parts[1]).toMatch(/^Author: [^\<\>]+ \<[\w\.]+@[\w\.]+\>$/);
expect(parts[1]).toMatch(
/^Author: [^\<\>]+ \<[A-Za-z0-9._+\-]+@[\w\.]+\>$/
);
expect(parts[2]).toMatch(/^Date: .+$/);
expect(parts[3]).toBe('');
expect(parts[4]).toMatch(/^\s{4}.+$/);
Expand Down

0 comments on commit 6e93826

Please sign in to comment.