From 17f06443dc1946605e1a116d39ca0fddc9a8e33f Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Tue, 18 Aug 2026 01:03:42 +0200 Subject: [PATCH] test(app): prebundle browser JSX runtime --- .../app/src/composer/tracks-panel.browser.test.tsx | 10 ---------- packages/app/vitest.config.ts | 1 + 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/app/src/composer/tracks-panel.browser.test.tsx b/packages/app/src/composer/tracks-panel.browser.test.tsx index 91c4dd790..52833b9dc 100644 --- a/packages/app/src/composer/tracks-panel.browser.test.tsx +++ b/packages/app/src/composer/tracks-panel.browser.test.tsx @@ -4,16 +4,6 @@ import { Pressable, Text } from "react-native"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { ComposerTrackPill, ComposerTrackRow } from "./tracks"; -vi.mock("react-native-reanimated", async () => { - const actual = - await vi.importActual("react-native-reanimated"); - const { View } = await vi.importActual("react-native"); - return { - ...actual, - default: { ...actual.default, View }, - }; -}); - // App sources compile against the classic JSX runtime, which expects React on the global. beforeEach(() => vi.stubGlobal("React", React)); diff --git a/packages/app/vitest.config.ts b/packages/app/vitest.config.ts index 5c1b82060..3f96ad3bc 100644 --- a/packages/app/vitest.config.ts +++ b/packages/app/vitest.config.ts @@ -65,6 +65,7 @@ export default defineConfig({ // so it scans the native files and dies on imports react-native-web has no answer for. // Unbundled, the same imports go through the resolver below and land on the web files. optimizeDeps: { + include: ["react/jsx-runtime"], exclude: ["react-native-reanimated"], }, // The globals a React Native bundler defines, which esbuild is no longer there to supply for