Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(test): make createComment assertion resilient to trailing undefined args

Jiayuanf2289bd73379
diff --git a/apps/web/app/(dashboard)/issues/[id]/page.test.tsx b/apps/web/app/(dashboard)/issues/[id]/page.test.tsx
index 8e27d5e100..54acedfd00 100644
--- a/apps/web/app/(dashboard)/issues/[id]/page.test.tsx
+++ b/apps/web/app/(dashboard)/issues/[id]/page.test.tsx
@@ -331,10 +331,10 @@ describe("IssueDetailPage", () => {
await user.click(submitBtn);
await waitFor(() => {
- expect(mockCreateComment).toHaveBeenCalledWith(
- "issue-1",
- "New test comment",
- );
+ expect(mockCreateComment).toHaveBeenCalled();
+ const [issueId, content] = mockCreateComment.mock.calls[0]!;
+ expect(issueId).toBe("issue-1");
+ expect(content).toBe("New test comment");
});
await waitFor(() => {