From 2df38c0e66cb4fc971f2640fff782748b04214a6 Mon Sep 17 00:00:00 2001 From: Dotta Date: Sat, 6 Jun 2026 19:35:15 +0000 Subject: [PATCH] Fix interaction card test act helper Co-Authored-By: Paperclip --- ui/src/components/IssueThreadInteractionCard.test.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/src/components/IssueThreadInteractionCard.test.tsx b/ui/src/components/IssueThreadInteractionCard.test.tsx index fb43e49b90b..ca025ec3458 100644 --- a/ui/src/components/IssueThreadInteractionCard.test.tsx +++ b/ui/src/components/IssueThreadInteractionCard.test.tsx @@ -1,7 +1,7 @@ // @vitest-environment jsdom -import { act } from "react"; import type { ComponentProps, ReactNode } from "react"; +import { flushSync } from "react-dom"; import { createRoot, type Root } from "react-dom/client"; import { afterEach, describe, expect, it, vi } from "vitest"; import { IssueThreadInteractionCard } from "./IssueThreadInteractionCard"; @@ -34,6 +34,10 @@ vi.mock("@/lib/router", () => ({ ), })); +function act(callback: () => void) { + flushSync(callback); +} + function renderCard( props: Partial> = {}, ) {