Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

test(mobile): isolate native webview in source label rendering tests

Chris52982ed58ee2
diff --git a/apps/mobile/src/__tests__/messageSourceLabelsRender.test.tsx b/apps/mobile/src/__tests__/messageSourceLabelsRender.test.tsx
index 70763a21ea..112f44a033 100644
--- a/apps/mobile/src/__tests__/messageSourceLabelsRender.test.tsx
+++ b/apps/mobile/src/__tests__/messageSourceLabelsRender.test.tsx
@@ -150,6 +150,9 @@ vi.mock("react-native-svg", () => ({
}));
vi.mock("react-native-uitextview", async () => ({ UITextView: (await import('react-native')).Text }));
vi.mock("expo-image", () => ({ Image: () => null }));
+// The site-video preview imports this native surface; label tests keep the
+// production renderer but must not load React Native's Flow runtime in Node.
+vi.mock("react-native-webview", () => ({ WebView: () => null }));
vi.mock("expo-router", () => ({
useRouter: () => ({ push: vi.fn() }),
useFocusEffect: vi.fn(),