-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathvitest.workspace.ts
38 lines (37 loc) · 1.04 KB
/
vitest.workspace.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
import { defineWorkspace } from "vitest/config"
export default defineWorkspace([
{
extends: "./vitest.config.ts",
test: {
name: "server tests",
environment: "node",
// Include generic .test files that should work anywhere and .server.test files for server only, ignore .browser.test
include: ["./**/*.server.test.{ts,tsx}", "!./**.browser.test.{ts,tsx}", "./**/*.test.{ts,tsx}"],
},
},
{
extends: "./vitest.config.ts",
optimizeDeps: {
include: ["react/jsx-dev-runtime"],
},
server: {
fs: {
strict: false,
},
},
test: {
includeTaskLocation: true,
// Include generic .test files that should work anywhere and .browser.test files for browser only, ignore .server.test
include: ["./**.test.{ts,tsx}", "./**.browser.test.{ts,tsx}", "!./**.server.test.{ts,tsx}"],
setupFiles: ["./tests/setup.browser.tsx"],
name: "browser tests",
browser: {
enabled: true,
instances: [{ browser: "chromium" }],
provider: "playwright",
// https://playwright.dev
providerOptions: {},
},
},
},
])