mirror of
https://github.com/renovatebot/renovate.git
synced 2026-11-01 10:09:50 +00:00
48 lines
1.5 KiB
TypeScript
48 lines
1.5 KiB
TypeScript
import { Fixtures } from '~test/fixtures.ts';
|
|
import { readOnlyIssueBody } from './read-only-issue-body.ts';
|
|
|
|
const issueBody = Fixtures.get('issue-body.txt');
|
|
|
|
describe('modules/platform/utils/read-only-issue-body', () => {
|
|
describe('.readOnlyIssueBody', () => {
|
|
it('removes all checkbox formatting', () => {
|
|
expect(readOnlyIssueBody(issueBody)).toEqual(
|
|
expect.not.stringContaining('[ ] <!--'),
|
|
);
|
|
});
|
|
|
|
it('removes all checkbox-related instructions', () => {
|
|
expect(readOnlyIssueBody(issueBody)).toEqual(
|
|
expect.not.stringMatching(/click on a checkbox below/gi),
|
|
);
|
|
});
|
|
|
|
it('removes all approval-all-pending-prs', () => {
|
|
expect(readOnlyIssueBody(issueBody)).toEqual(
|
|
expect.not.stringMatching('Create all pending approval PRs at once'),
|
|
);
|
|
});
|
|
|
|
it('removes the create-all-rate-limited-prs', () => {
|
|
const s = readOnlyIssueBody(issueBody);
|
|
expect(s).toEqual(
|
|
expect.not.stringMatching('Create all rate-limited PRs at once'),
|
|
);
|
|
});
|
|
|
|
it('removes create-config-migration-pr', () => {
|
|
const s = readOnlyIssueBody(issueBody);
|
|
expect(s).toEqual(
|
|
expect.not.stringMatching('create an automated Config Migration PR'),
|
|
);
|
|
});
|
|
|
|
it('removes the create-all-awaiting-schedule-prs', () => {
|
|
const s = readOnlyIssueBody(issueBody);
|
|
expect(s).toEqual(
|
|
expect.not.stringMatching('Create all awaiting schedule PRs at once'),
|
|
);
|
|
});
|
|
});
|
|
});
|