我提出这个问题的原因是因为我可以在 StackOverflow 上找到的唯一 Q/As 与找不到插件有关,解决方案是添加到插件列表中。但是,这是不同的,因为插件已成功找到,但无论如何都无法加载。
我不确定我需要更改或做什么才能使覆盖范围成功运行。
下面是我尝试通过 Grunt 运行覆盖任务时得到的输出。
Running "karma:unit_coverage" (karma) task
INFO [karma]: Karma v0.10.10 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
WARN [preprocess]: Can not load "coverage"!
TypeError: Object function lodash(value) {
// don't wrap if already wrapped, even if wrapped by a different `lodash` constructor
return (value && typeof value == 'object' && !isArray(value) && hasOwnProperty.call(value, '__wrapped__'))
? value
: new lodashWrapper(value);
} has no method 'includes'
at createCoveragePreprocessor (/home/jon/dev/romonet/portal/node_modules/karma-coverage/lib/preprocessor.js:56:10)
at Array.invoke [as 0] (/home/jon/dev/romonet/portal/node_modules/karma/node_modules/di/lib/injector.js:75:15)
at get (/home/jon/dev/romonet/portal/node_modules/karma/node_modules/di/lib/injector.js:48:43)
at instantiatePreprocessor (/home/jon/dev/romonet/portal/node_modules/karma/lib/preprocessor.js:40:37)
at Array.forEach (native)
at /home/jon/dev/romonet/portal/node_modules/karma/lib/preprocessor.js:57:29
at /home/jon/dev/romonet/portal/node_modules/karma/lib/file-list.js:196:17
at Object.oncomplete (fs.js:107:15)
以下是我安装的软件包版本:
├─┬ grunt-karma@0.6.2
├─┬ karma@0.10.10
├─┬ karma-coverage@0.5.5