mirror of
https://github.com/hanzoai/vitest.git
synced 2026-09-24 17:04:25 +00:00
test(browser): cover instance headless overrides (#10851)
This commit is contained in:
@@ -288,6 +288,25 @@ test('inherits browser options', async () => {
|
||||
])
|
||||
})
|
||||
|
||||
test.each([true, false])('browser instance headless overrides root headless: $0', async (headless) => {
|
||||
const projects = await config({
|
||||
browser: {
|
||||
enabled: true,
|
||||
provider: preview(),
|
||||
headless,
|
||||
instances: [
|
||||
{ browser: 'chromium', name: 'inherits-root' },
|
||||
{ browser: 'firefox', name: 'overrides-root', headless: !headless },
|
||||
],
|
||||
},
|
||||
})
|
||||
|
||||
expect(projects.map(project => project.projectConfig.browser.headless)).toEqual([
|
||||
headless,
|
||||
!headless,
|
||||
])
|
||||
})
|
||||
|
||||
test('coverage provider v8 works correctly in browser mode if instances are filtered', async () => {
|
||||
const projects = await config(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user