(
structure: TestFsStructure,
config: ViteUserConfig['test'] = {},
)
| 28 | const browser = 'chromium' |
| 29 | |
| 30 | async function runBrowserTests( |
| 31 | structure: TestFsStructure, |
| 32 | config: ViteUserConfig['test'] = {}, |
| 33 | ) { |
| 34 | return runInlineTests({ |
| 35 | ...structure, |
| 36 | 'vitest.config.js': ` |
| 37 | import { playwright } from '@vitest/browser-playwright' |
| 38 | export default { |
| 39 | test: { |
| 40 | browser: { |
| 41 | enabled: true, |
| 42 | screenshotFailures: false, |
| 43 | provider: playwright(), |
| 44 | headless: true, |
| 45 | instances: [{ browser: ${JSON.stringify(browser)} }], |
| 46 | }, |
| 47 | reporters: ['verbose'], |
| 48 | ...${JSON.stringify(config)}, |
| 49 | }, |
| 50 | }`, |
| 51 | }, { |
| 52 | $cliOptions: { |
| 53 | watch: true, |
| 54 | }, |
| 55 | }) |
| 56 | } |
| 57 | |
| 58 | describe.runIf(provider.name === 'playwright')('--watch', () => { |
| 59 | test( |
no test coverage detected