Fix interaction card test act helper

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-06-06 19:35:15 +00:00
1 parent c8c3ee9c07
commit 2df38c0e66
1 file changed
+5 -1
@@ -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<ComponentProps<typeof IssueThreadInteractionCard>> = {},
) {