fix(test): make createComment assertion resilient to trailing undefined args
On CI (Node 22 / ubuntu), mockCreateComment receives extra undefined args. Check only the first two positional args instead of exact match.
This commit is contained in:
parent
259f2823bc
commit
f2289bd733
1 changed files with 4 additions and 4 deletions
|
|
@ -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(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue