Skip to content

Commit ed11230

Browse files
committed
Make tests run in all environments properly
1 parent b1019f8 commit ed11230

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
File renamed without changes.

vitest.workspace.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ export default defineWorkspace([
99
test: {
1010
name: "server tests",
1111
environment: "node",
12-
include: ["./**/*.server.test.{ts,tsx}"],
12+
// Include generic .test files that should work anywhere and .server.test files for server only, ignore .browser.test
13+
include: ["./**/*.server.test.{ts,tsx}","!./**.browser.test.{ts,tsx}","./**/*.test.{ts,tsx}"],
1314
},
1415
},
1516
{
@@ -24,7 +25,8 @@ export default defineWorkspace([
2425
},
2526
test: {
2627
includeTaskLocation: true,
27-
include: ["./**.test.{ts,tsx}", "!./**.server.test.{ts,tsx}"],
28+
// Include generic .test files that should work anywhere and .browser.test files for browser only, ignore .server.test
29+
include: ["./**.test.{ts,tsx}","./**.browser.test.{ts,tsx}", "!./**.server.test.{ts,tsx}"],
2830
setupFiles: ["./tests/setup.browser.tsx"],
2931
name: "browser tests",
3032
browser: {

0 commit comments

Comments
 (0)