Open
Description
https://github.com/fishbar/jscoverage/blob/master/lib/jscoverage.js#L36
if (typeof global === 'object') {
BASE = global;
} else if (typeof window === 'object') {
BASE = window;
} else {
throw new Error('[jscoverage] unknow ENV!');
}
when my code has variable window
,
var window = this; // this ref to window.
console.log(typeof 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
Metadata
Metadata
Assignees
Labels
No labels