我的 karma.conf.js 包括:
plugins: [
'karma-jasmine',
'karma-phantomjs-launcher',
'karma-ng-html2js-preprocessor'
],
preprocessors: {
'../../mypath/*.html': ['ng-html2js']
},
ngHtml2JsPreprocessor: {
moduleName: 'templates'
},
(我也试过没有指定任何插件。)
我的 devDependencies 包括:
"karma-ng-html2js-preprocessor": "^0.2.0"`
我的测试包括:
beforeEach(module('templates'));
这些给出了错误:
Module 'templates' is not available!
运行 karma --log-level debug
,我没有看到任何[preprocessor.html2js]
条目。(我确实得到Loading plugin karma-ng-html2js-preprocessor.
)
我究竟做错了什么?