Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

vite.config.ts

42 lines1.2 KB

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/native/useRestingTopOffset.test.tsx",
10 "src/state/use-selected-thread-git-actions.test.tsx",
11];
12​
13export default defineConfig({
14 test: {
15 hookTimeout: 60_000,
16 testTimeout: 60_000,
17 projects: [
18 {
19 extends: true,
20 test: {
21 name: "unit",
22 include: ["**/*.test.{ts,tsx,mjs}"],
23 exclude: ["**/node_modules/**", ...reactTests],
24 setupFiles: [
25 "../../packages/shared/src/testing/longTempDir.ts",
26 "../../packages/shared/src/testing/providerEnv.ts",
27 ],
28 },
29 },
30 {
31 extends: true,
32 test: {
33 name: "react",
34 include: reactTests,
35 // Native components mock React Native and render through react-dom in these tests.
36 environment: "jsdom",
37 setupFiles: ["../../packages/shared/src/testing/providerEnv.ts"],
38 },
39 },
40 ],
41 },
42});