-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: browser tests to include project name
- Loading branch information
1 parent
9c9e69b
commit 5bb20e1
Showing
2 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
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() | ||
// TODO 2024-12-11 check |name| when it's supported | ||
expect(result.stdout).toContain('✓ basic.bench.ts > suite-a') | ||
|
||
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) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters