标题说明了一切.尽管在网上搜索,我还没有找到解决这个问题的单一例子.
这是一些有些失误
https://github.com/amitayd/grunt-browserify-jasmine-node-example - grunt,browserify和jasmine
https://github.com/gotwarlost/istanbul/issues/59#issuecomment-18799734 - browserify和伊斯坦布尔
这是我正在进行的代码https://github.com/wheresrhys/on-guard/tree/browserify(注意它是'browserify'分支--Gruntfile.js有点乱,但很快就会整理它).我初步调查使用console.log
表明在某种程度上bundle.src.js
正在加载页面,但是当测试运行(并传递!)时,代码中bundle.src.js
没有运行,所以我觉得它可能是一个别名问题...虽然是一个仅限于phantomjs,因为当我打开chrome中的specrunner时代码正在运行.