MCPcopy
hub / github.com/vitest-dev/vitest / runBrowserTests

Function runBrowserTests

test/browser/specs/failure-screenshot.test.ts:8–31  ·  view source on GitHub ↗
(
  structure: TestFsStructure,
)

Source from the content-addressed store, hash-verified

6const testFilename = 'basic.test.ts'
7
8async function runBrowserTests(
9 structure: TestFsStructure,
10) {
11 return runInlineTests({
12 ...structure,
13 'vitest.config.js': `
14 import { instances, provider } from '../settings.ts'
15
16 export default {
17 test: {
18 browser: {
19 enabled: true,
20 screenshotFailures: true,
21 provider,
22 ui: false,
23 headless: true,
24 instances: instances.slice(0, 1), // logic not bound to browser instance
25 },
26 reporters: ['verbose'],
27 update: 'new',
28 },
29 }`,
30 })
31}
32
33describe('failure screenshots', () => {
34 describe('`toMatchScreenshot`', () => {

Callers 1

Calls 1

runInlineTestsFunction · 0.90

Tested by

no test coverage detected