mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 06:02:57 +03:00
docs: fix class-coverage snippet for v8toIstanbul (#13371)
Co-authored-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
parent
1dc2d02d35
commit
de518338ce
@ -20,7 +20,7 @@ const v8toIstanbul = require('v8-to-istanbul');
|
||||
await page.goto('https://chromium.org');
|
||||
const coverage = await page.coverage.stopJSCoverage();
|
||||
for (const entry of coverage) {
|
||||
const converter = new v8toIstanbul('', 0, { source: entry.source });
|
||||
const converter = v8toIstanbul('', 0, { source: entry.source });
|
||||
await converter.load();
|
||||
converter.applyCoverage(entry.functions);
|
||||
console.log(JSON.stringify(converter.toIstanbul()));
|
||||
|
2
packages/playwright-core/types/types.d.ts
vendored
2
packages/playwright-core/types/types.d.ts
vendored
@ -13257,7 +13257,7 @@ export interface ConsoleMessage {
|
||||
* await page.goto('https://chromium.org');
|
||||
* const coverage = await page.coverage.stopJSCoverage();
|
||||
* for (const entry of coverage) {
|
||||
* const converter = new v8toIstanbul('', 0, { source: entry.source });
|
||||
* const converter = v8toIstanbul('', 0, { source: entry.source });
|
||||
* await converter.load();
|
||||
* converter.applyCoverage(entry.functions);
|
||||
* console.log(JSON.stringify(converter.toIstanbul()));
|
||||
|
Loading…
Reference in New Issue
Block a user