From 16e3776a9cc0a95db79d01faa9b1a660e0a54222 Mon Sep 17 00:00:00 2001 From: Tapajyoti Bose <44058757+ruppysuppy@users.noreply.github.com> Date: Fri, 17 Jul 2020 09:02:49 +0530 Subject: [PATCH] fix(JSCoverageEntry): added scriptId and isBlockCoverage (#2955) --- docs/api.md | 2 ++ src/types.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/api.md b/docs/api.md index 81b942d698..db37b1135c 100644 --- a/docs/api.md +++ b/docs/api.md @@ -4299,9 +4299,11 @@ const v8toIstanbul = require('v8-to-istanbul'); #### chromiumCoverage.stopJSCoverage() - returns: <[Promise]<[Array]<[Object]>>> Promise that resolves to the array of coverage reports for all scripts - `url` <[string]> Script URL + - `scriptId` <[string]> Script ID - `source` <[string]> Script content, if applicable. - `functions` <[Array]<[Object]>> V8-specific coverage format. - `functionName` <[string]> + - `isBlockCoverage` <[boolean]> - `ranges` <[Array]<[Object]>> - `count` <[number]> - `startOffset` <[number]> diff --git a/src/types.ts b/src/types.ts index 0a6aae824f..e53dcfe121 100644 --- a/src/types.ts +++ b/src/types.ts @@ -149,9 +149,11 @@ export type CSSCoverageEntry = { export type JSCoverageEntry = { url: string, + scriptId: string, source?: string, functions: { functionName: string, + isBlockCoverage: boolean, ranges: JSRange[] }[] };