-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.ts
48 lines (47 loc) · 1.05 KB
/
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
44
45
46
47
48
/// <reference types="vitest" />
import { getViteConfig } from "astro/config";
export default getViteConfig({
test: {
coverage: {
include: ["src/**"],
provider: "istanbul",
},
globals: true, // needed for testing-library teardown
// Vitest configuration options
setupFiles: ["setupTests.ts"],
workspace: [
{
extends: true,
test: {
environment: "node",
include: ["src/api/**/*.spec.ts"],
name: "api-node",
},
},
{
extends: true,
test: {
environment: "node",
include: ["src/pages/**/*.spec.ts"],
name: "pages-node",
},
},
{
extends: true,
test: {
environment: "node",
include: ["src/components/**/*.spec.ts"],
name: "components-node",
},
},
{
extends: true,
test: {
environment: "jsdom",
include: ["src/components/**/*.spec.tsx"],
name: "components-jsdom",
},
},
],
},
});