-
-
Notifications
You must be signed in to change notification settings - Fork 372
/
vitest.config.ts
43 lines (39 loc) · 956 Bytes
/
vitest.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { version } from "react";
import { configDefaults, defineConfig } from "vitest/config";
const excludeFromReact17 = [
"examples/form-callback-queue",
"examples/*-framer-motion/**",
"examples/dialog-animated-various",
"examples/combobox-group",
"examples/*-radix*/**",
];
const includeWithStyles = [
/combobox-tabs-animated/,
/dialog-animated-various/,
/dialog-combobox-command-menu/,
/disclosure-content-animating/,
];
const isReact17 = version.startsWith("17");
export default defineConfig({
test: {
globals: true,
watch: false,
testTimeout: 10_000,
environment: "jsdom",
setupFiles: ["vitest.setup.ts"],
include: ["**/*test.{ts,tsx}"],
exclude: [
...configDefaults.exclude,
...(isReact17 ? excludeFromReact17 : []),
],
css: {
include: includeWithStyles,
},
sequence: {
hooks: "parallel",
},
coverage: {
include: ["packages"],
},
},
});