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

vite.config.ts

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