mirror of
https://github.com/hanzoai/vitest.git
synced 2026-09-24 17:04:25 +00:00
30 lines
611 B
TypeScript
30 lines
611 B
TypeScript
import { playwright } from '@vitest/browser-playwright'
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
let config = defineConfig({
|
|
define: {
|
|
'process.env.TEST_PROCESS_ENV': JSON.stringify('PROCESS_OK'),
|
|
'import.meta.env.TEST_META_ENV': JSON.stringify('META_OK'),
|
|
},
|
|
test: {
|
|
browser: {
|
|
enabled: true,
|
|
provider: playwright(),
|
|
headless: true,
|
|
instances: [
|
|
{ browser: 'chromium' },
|
|
],
|
|
},
|
|
},
|
|
})
|
|
|
|
if (process.env.BROWSER_DEFINE_TEST_PROJECT === "true") {
|
|
config = defineConfig({
|
|
test: {
|
|
projects: [config],
|
|
},
|
|
})
|
|
}
|
|
|
|
export default config
|