Skip to content

Commit

Permalink
test(platform/gitea): replace massageMarkdown (#15070)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Apr 12, 2022
1 parent e789942 commit 0a26456
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/modules/platform/gitea/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1520,10 +1520,13 @@ describe('modules/platform/gitea/index', () => {
});

describe('massageMarkdown', () => {
it('should truncate body to 1000000 characters', () => {
const excessiveBody = '*'.repeat(1000001);
it('replaces pr links', () => {
const body =
'[#123](../pull/123) [#124](../pull/124) [#125](../pull/125)';

expect(gitea.massageMarkdown(excessiveBody)).toHaveLength(1000000);
expect(gitea.massageMarkdown(body)).toBe(
'[#123](pulls/123) [#124](pulls/124) [#125](pulls/125)'
);
});
});

Expand Down

0 comments on commit 0a26456

Please sign in to comment.