You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"detector 模块中书写了 var window = this 这样的代码"
这句有可能会影响到,因为jscoverage的这段inject在代码的最前面,
当你的代码中出现 var window = this 作为一个全局的声明,
会将window重新define(如果window已经存在的话) (部分js引擎的解析貌似是这个样子)
当执行到这个statement时才赋值为 this, 所以会出现window为undefined的情况,也就命中了jscoverage的判断。
https://github.com/fishbar/jscoverage/blob/master/lib/jscoverage.js#L36
when my code has variable
window
,will console log
object
run in node, build as cmd module and run in web, or run in phantom.but throw error
[jscoverage] unknow ENV!
here, why?ref
The text was updated successfully, but these errors were encountered: