Skip to content

Commit c9ad5fd

Browse files
committed
test: browser tests to include project name
1 parent 9c9e69b commit c9ad5fd

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import { expect, test } from 'vitest'
22
import { runVitest } from '../../test-utils'
33

4+
const IS_PLAYWRIGHT = process.env.PROVIDER === 'playwright'
5+
const CHROMIUM = IS_PLAYWRIGHT ? 'chromium' : 'chrome'
6+
47
test('benchmark', async () => {
58
const result = await runVitest({ root: 'fixtures/benchmark' }, [], 'benchmark')
69
expect(result.stderr).toReportNoErrors()
7-
// TODO 2024-12-11 check |name| when it's supported
8-
expect(result.stdout).toContain('✓ basic.bench.ts > suite-a')
10+
expect(result.stdout).toContain(`✓ |${CHROMIUM}| basic.bench.ts > suite-a`)
11+
expect(result.stdout).toContain('✓ |firefox| basic.bench.ts > suite-a')
12+
expect(result.stdout).toContain('✓ |webkit| basic.bench.ts > suite-a')
913
expect(result.exitCode).toBe(0)
1014
})

test/browser/vitest.config.unit.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default defineConfig({
88
singleFork: true,
99
},
1010
},
11+
reporters: 'verbose',
1112
setupFiles: ['./setup.unit.ts'],
1213
// 3 is the maximum of browser instances - in a perfect world they will run in parallel
1314
hookTimeout: process.env.CI ? 120_000 * 3 : 20_000,

0 commit comments

Comments
 (0)