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

vite.config.ts

45 lines1.4 KB

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