Coverage.startJSCoverage() 方法
¥Coverage.startJSCoverage() method
签名
¥Signature
class Coverage {
startJSCoverage(options?: JSCoverageOptions): Promise<void>;
}
参数
¥Parameters
范围 | 类型 | 描述 |
---|---|---|
options | (可选的)覆盖范围的可配置选项集默认为 |
Returns:
Promise<void>
Promise 在覆盖范围开始时解决。
¥Promise that resolves when coverage is started.
备注
¥Remarks
匿名脚本是没有关联 URL 的脚本。这些是使用 eval
或 new Function
在页面上动态创建的脚本。If reportAnonymousScripts
is set to true
, anonymous scripts URL will start with debugger://VM
(unless a magic //# sourceURL comment is present, in which case that will the be URL).
¥Anonymous scripts are ones that don't have an associated url. These are scripts that are dynamically created on the page using eval
or new Function
. If reportAnonymousScripts
is set to true
, anonymous scripts URL will start with debugger://VM
(unless a magic //# sourceURL comment is present, in which case that will the be URL).