Skip to content

Commit b6c2d08

Browse files
committed
Improve coverage accuracy by replacing v8 with istanbul
1 parent 5f164d5 commit b6c2d08

File tree

10 files changed

+868
-137
lines changed

10 files changed

+868
-137
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ yarn-debug.log*
99
yarn-error.log*
1010
test-results
1111
playwright-report
12+
.nyc_output
13+
coverage

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,15 @@ jobs:
2828
env:
2929
TEST_SAFARI: yes
3030
run: npm run test:e2e
31-
- name: Upload E2E test coverage
31+
- name: Report coverage
32+
id: report
3233
if: ${{ always() }}
34+
run: npm run test:lcov
35+
- name: Upload E2E test coverage
36+
if: steps.report.outcome == 'success'
3337
uses: codecov/codecov-action@v4
3438
with:
3539
token: ${{ secrets.CODECOV_TOKEN }}
36-
files: coverage/clover.xml
40+
files: coverage/lcov.info
3741
flags: e2etests
3842
fail_ci_if_error: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/coverage
1010
/test-results
1111
/playwright-report
12+
/.nyc_output
1213

1314
# production
1415
/build

deleteCoverageData.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { FullConfig } from "playwright/test";
2+
import path from "path";
3+
import * as fsPromises from "node:fs/promises";
4+
5+
async function globalSetup(_config: FullConfig) {
6+
const nycOutput = path.join(process.cwd(), ".nyc_output");
7+
await fsPromises.rm(nycOutput, { recursive: true, force: true });
8+
}
9+
10+
export default globalSetup;

0 commit comments

Comments
 (0)