Created
September 4, 2024 08:21
-
-
Save mizchi/c2e8ba6b3f7b23bb5b6f3761437f09b8 to your computer and use it in GitHub Desktop.
Run unit tests and browser-tests in one config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { defineWorkspace } from "vitest/config"; | |
export default defineWorkspace([ | |
{ | |
extends: "vite.config.ts", | |
test: { | |
name: "unit", | |
environment: "node", | |
include: ["src/**/*.test.ts"], | |
}, | |
}, | |
{ | |
extends: "vite.config.ts", | |
test: { | |
include: ["src/**/*.browser-test.ts"], | |
browser: { | |
enabled: true, | |
name: "chromium", | |
headless: true, | |
provider: "playwright", | |
providerOptions: {}, | |
}, | |
}, | |
}, | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment