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