chore: calculate code coverage

This commit is contained in:
2024-03-23 22:20:11 +01:00
parent c4878caef3
commit 4cb8daf908
6 changed files with 1137 additions and 1156 deletions

View File

@@ -106,7 +106,9 @@ export async function puppeteerRunTest(opts: Partial<TestOptions>, hostUrl: stri
await cb(page);
}
const htmlHandle = await page.$('html');
const html = await page.evaluate(html => html?.outerHTML ?? html?.innerHTML, htmlHandle);
const html = await page.evaluate( // potentially trips up Jest's code coverage, hence the istanbul ignore
/* istanbul ignore next */html => html?.outerHTML ?? html?.innerHTML, htmlHandle
);
// Add the final html
output.html = html || '';