Skip to content

Commit 4b6e65a

Browse files
committed
test(pr-quality): cover legacy migration on no-op wake
1 parent 9735e6f commit 4b6e65a

1 file changed

Lines changed: 21 additions & 5 deletions

File tree

‎tests/zz-pr-coderabbit-readiness-revalidation.test.ts‎

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,18 +187,34 @@ describe("workflow comment-spam hardening", () => {
187187
eventName: "status",
188188
maintainersFile: MAINTAINERS_FIXTURE,
189189
labels: ["review-ready"],
190-
comments: [{
191-
id: 7,
192-
user: { login: "github-actions[bot]" },
193-
body: steadyBody,
194-
}],
190+
comments: [
191+
{
192+
id: 7,
193+
user: { login: "github-actions[bot]" },
194+
body: steadyBody,
195+
},
196+
{
197+
id: 8,
198+
user: { login: "github-actions[bot]" },
199+
body: "<!-- pr-quality-enforcer -->\nlegacy enforcer comment",
200+
},
201+
{
202+
id: 9,
203+
user: { login: "github-actions[bot]" },
204+
body: "<!-- pr-quality-readiness -->\nlegacy readiness comment",
205+
},
206+
],
195207
});
196208

197209
expect(callsTo(statusWake, "issues.updateComment")).toEqual([]);
198210
expect(callsTo(statusWake, "issues.createComment")).toEqual([]);
199211
expect(callsTo(statusWake, "issues.addLabels")).toEqual([]);
200212
expect(callsTo(statusWake, "issues.removeLabel")).toEqual([]);
201213
expect(callsTo(statusWake, "pulls.update")).toEqual([]);
214+
expect(callsTo(statusWake, "issues.deleteComment")).toEqual([
215+
{ owner: "lidge-jun", repo: "opencodex", comment_id: 8 },
216+
{ owner: "lidge-jun", repo: "opencodex", comment_id: 9 },
217+
]);
202218

203219
const graphqlCalls = callsTo(statusWake, "graphql") as Array<{ query: string }>;
204220
expect(graphqlCalls.some(call => call.query.includes("convertPullRequestToDraft"))).toBe(false);

0 commit comments

Comments
 (0)