(
config?: Omit<TestUserConfig, 'browser'> & { browser?: Partial<TestUserConfig['browser']> },
include?: string[],
viteOverrides?: Partial<ViteUserConfig>,
runnerOptions?: VitestRunnerCLIOptions,
)
| 30 | } |
| 31 | |
| 32 | export async function runBrowserTests( |
| 33 | config?: Omit<TestUserConfig, 'browser'> & { browser?: Partial<TestUserConfig['browser']> }, |
| 34 | include?: string[], |
| 35 | viteOverrides?: Partial<ViteUserConfig>, |
| 36 | runnerOptions?: VitestRunnerCLIOptions, |
| 37 | ) { |
| 38 | const result = await runVitest({ |
| 39 | watch: false, |
| 40 | reporters: 'none', |
| 41 | ...config, |
| 42 | browser: { headless: true, ...config?.browser }, |
| 43 | $viteConfig: viteOverrides, |
| 44 | }, include, runnerOptions) |
| 45 | |
| 46 | return { ...result, stderr: result.stderr.replace('Testing types with tsc and vue-tsc is an experimental feature.\nBreaking changes might not follow SemVer, please pin Vitest\'s version when using it.\n', '') } |
| 47 | } |
no test coverage detected