mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
22 lines
770 B
TypeScript
22 lines
770 B
TypeScript
import { expect, test } from 'vitest'
|
|
import { runVitest } from '../../test-utils'
|
|
|
|
const IS_PLAYWRIGHT = process.env.PROVIDER === 'playwright'
|
|
|
|
test('benchmark', async () => {
|
|
const result = await runVitest({ root: 'fixtures/benchmark' }, [], 'benchmark')
|
|
expect(result.stderr).toReportNoErrors()
|
|
|
|
if (IS_PLAYWRIGHT) {
|
|
expect(result.stdout).toContain('✓ |chromium| basic.bench.ts > suite-a')
|
|
expect(result.stdout).toContain('✓ |firefox| basic.bench.ts > suite-a')
|
|
expect(result.stdout).toContain('✓ |webkit| basic.bench.ts > suite-a')
|
|
}
|
|
else {
|
|
expect(result.stdout).toContain('✓ |chrome| basic.bench.ts > suite-a')
|
|
expect(result.stdout).toContain('✓ |firefox| basic.bench.ts > suite-a')
|
|
}
|
|
|
|
expect(result.exitCode).toBe(0)
|
|
})
|