fix(JSCoverageEntry): added scriptId and isBlockCoverage (#2955)

This commit is contained in:
Tapajyoti Bose 2020-07-17 09:02:49 +05:30 committed by GitHub
parent 424f11d165
commit 16e3776a9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -4299,9 +4299,11 @@ const v8toIstanbul = require('v8-to-istanbul');
#### chromiumCoverage.stopJSCoverage() #### chromiumCoverage.stopJSCoverage()
- returns: <[Promise]<[Array]<[Object]>>> Promise that resolves to the array of coverage reports for all scripts - returns: <[Promise]<[Array]<[Object]>>> Promise that resolves to the array of coverage reports for all scripts
- `url` <[string]> Script URL - `url` <[string]> Script URL
- `scriptId` <[string]> Script ID
- `source` <[string]> Script content, if applicable. - `source` <[string]> Script content, if applicable.
- `functions` <[Array]<[Object]>> V8-specific coverage format. - `functions` <[Array]<[Object]>> V8-specific coverage format.
- `functionName` <[string]> - `functionName` <[string]>
- `isBlockCoverage` <[boolean]>
- `ranges` <[Array]<[Object]>> - `ranges` <[Array]<[Object]>>
- `count` <[number]> - `count` <[number]>
- `startOffset` <[number]> - `startOffset` <[number]>

View File

@ -149,9 +149,11 @@ export type CSSCoverageEntry = {
export type JSCoverageEntry = { export type JSCoverageEntry = {
url: string, url: string,
scriptId: string,
source?: string, source?: string,
functions: { functions: {
functionName: string, functionName: string,
isBlockCoverage: boolean,
ranges: JSRange[] ranges: JSRange[]
}[] }[]
}; };