Fix Playwright coverage collection and merge

This commit is contained in:
beatz174-bit
2025-12-02 16:40:09 +10:00
parent 6192bd20eb
commit 35e6ecca0f
8 changed files with 86 additions and 89 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ test.afterEach(async ({ page }, testInfo) => {
// evaluate coverage from the page
const coverage = await page.evaluate(() => (globalThis.__coverage__ || {}));
if (coverage && Object.keys(coverage).length) {
const dir = path.join(process.cwd(), '.nyc_output');
const dir = path.join(process.cwd(), 'coverage-reports', 'e2e', '.nyc_output');
fs.mkdirSync(dir, { recursive: true });
// unique file per worker/test