-
Notifications
You must be signed in to change notification settings - Fork 266
Expand file tree
/
Copy pathvitest.browser.config.ts
More file actions
27 lines (25 loc) · 955 Bytes
/
Copy pathvitest.browser.config.ts
File metadata and controls
27 lines (25 loc) · 955 Bytes
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
import {playwright} from '@vitest/browser-playwright'
import {defineConfig} from 'vitest/config'
import {BROWSER_PORT} from './test/helpers/routes.ts'
import {ssePlugin} from './test/helpers/ssePlugin.ts'
import {sharedConfig} from './vitest.config.ts'
export default defineConfig({
plugins: [ssePlugin()],
test: {
...sharedConfig,
// No `globalSetup`: the endpoints are served by the plugin above, not a standalone server.
provide: {port: BROWSER_PORT, suite: 'browser'},
browser: {
enabled: true,
provider: playwright(),
// `127.0.0.1` rather than `localhost`, so that `localhost` is left over to serve as the
// second origin the CORS and cross-origin redirect tests need.
api: {host: '127.0.0.1', port: BROWSER_PORT},
instances: [
{browser: 'chromium', headless: true},
{browser: 'firefox', headless: true},
{browser: 'webkit', headless: true},
],
},
},
})