-
Notifications
You must be signed in to change notification settings - Fork 180
spm test 生成 coverage 失败 #1020
Comments
看看 /Users/hotoo/workbench/hotoo/detector/_site/coverage.json 的内容是啥
|
可能和代码书写方式有关,之前遇到过代码里扩展了原生对象 (Object, Array) 之类的导致生产不出来。 -- On September 16, 2014 at 6:26:56 PM, 闲耘™ (notifications@github.com) wrote: $ spm -v undefined:1 Fail to output _site/coverage.json — |
|
没有扩展 Object, Array 对象。 |
travis 也有同样的错误 |
- var window = this;
+ var win = this; jscoverage 里通过 window 判断环境的逻辑。 if (typeof global === 'object') {
BASE = global;
} else if (typeof window === 'object') {
BASE = window;
} else {
throw new Error('[jscoverage] unknow ENV!');
} |
8月13日还支持这个的。。 |
@sorrycc 辛苦了 |
....楼上 |
即便如此,typeof window 也应该是 object(我在 web, phantom, node 中打印 |
测试 https://github.com/hotoo/detector 模块时:
The text was updated successfully, but these errors were encountered: