-
Notifications
You must be signed in to change notification settings - Fork 254
Expand file tree
/
Copy pathvitest.config.ts
More file actions
41 lines (40 loc) · 873 Bytes
/
vitest.config.ts
File metadata and controls
41 lines (40 loc) · 873 Bytes
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
import { getViteConfig } from "astro/config";
import { configDefaults } from 'vitest/config';
import preact from "@preact/preset-vite";
export default getViteConfig({
// needed to ensure react 3rd party libraries work with preact
plugins: [preact()],
resolve: {
mainFields: ["module"],
},
test: {
projects: [
{
extends: true,
test: {
name: "DOM",
environment: "jsdom",
include: [
"test/**/*"
],
exclude: [
...configDefaults.exclude,
"test/api/OpenProcessing.test.ts",
"test/pages/*",
"test/mocks/*",
'test/a11y/**'
]
}
},
{
extends: true,
test: {
name: "node",
include: [
"test/pages/*"
]
}
}
]
},
});