Open History to see the last commit
1import { defineConfig } from "vite-plus";
2import "vite-plus/test/config";
3
4const reactTests = [
5 "src/features/pull-requests/usePullRequestEnvironmentFallback.test.tsx",
6 "src/lib/filePreview.test.ts",
7 "src/features/threads/thread-inspector-navigation.test.tsx",
8 "src/features/diffs/nativeReviewDiffSurface.test.tsx",
9 "src/features/pull-requests/usePullRequestDiff.test.tsx",
10 "src/components/ui/Dialog.android.test.tsx",
11 "src/features/settings/SettingsServerControlsRouteScreen.test.tsx",
12 "src/features/settings/components/BranchNamingSettings.test.tsx",
13 "src/features/threads/UsageLimitRecoveryCard.test.tsx",
14 "src/native/NativeHeaderToolbar.test.tsx",
15 "src/native/useRestingTopOffset.test.tsx",
16 "src/native/useRetryingImageSource.test.tsx",
17 "src/state/queries.debounce.test.tsx",
18 "src/state/use-selected-thread-git-actions.test.tsx",
19 "src/features/terminal/useTerminalExitNavigation.test.tsx",
20];
21
22export default defineConfig({
23 test: {
24 hookTimeout: 60_000,
25 testTimeout: 60_000,
26 projects: [
27 {
28 extends: true,
29 test: {
30 name: "unit",
31 include: ["**/*.test.{ts,tsx,mjs}"],
32 exclude: ["**/node_modules/**", ...reactTests],
33 setupFiles: [
34 "../../packages/shared/src/testing/longTempDir.ts",
35 "../../packages/shared/src/testing/providerEnv.ts",
36 ],
37 },
38 },
39 {
40 extends: true,
41 test: {
42 name: "react",
43 include: reactTests,
44 // Native components mock React Native and render through react-dom in these tests.
45 environment: "jsdom",
46 setupFiles: ["../../packages/shared/src/testing/providerEnv.ts"],
47 },
48 },
49 ],
50 },
51});