嗨,我遵循this 的角度教程,但通过运行下面的命令,test.bat。我得到了这个错误,可能不是很好的原因。
“不能加载脚本,它没有注册!也许你缺少了一些插件”
我遵循了本教程的所有步骤,我想我想念插入器。我在应用程序根目录中有一个名为node_modules的文件夹,所有这些插件都在哪里
karma
karma-chrome-launcher
karma-coffee-preprocessor
karma-firefox-launcher
karma-html2js-preprocessor
karma-jasmine
karma-junit-reporter
karma-phantomjs-launcher
karma-RequireJS
karma-script-launcher我的karma.config
module.exports = function(config){
config.set({
basePath : '../',
files : [
'app/lib/angular/angular.js',
'app/lib/angular/angular-*.js',
'test/lib/angular/angular-mocks.js',
'app/js/**/*.js',
'test/unit/**/*.js'
],
exclude: ['app/lib/angular/angular-scenario.js'],
autoWatch : true,
frameworks: ['jasmine'],
browsers : ['C:/Program Files/Google/Chrome/Application/chrome.exe'],
plugins : [
'karma-junit-reporter',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-jasmine'
],
junitReporter : {
outputFile: 'test_out/unit.xml',
suite: 'unit'
}}}
有人能帮我吗?
谢谢
发布于 2013-11-01 12:46:45
您需要将缺失的插件添加到业力配置插件部分:
plugins : [
'karma-junit-reporter',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-jasmine'
],或者简单地删除这个插件部分,业力将加载它找到的所有插件。(如果你没有太多的插件,就可以这么做)
编辑:
刚刚克隆并安装了测试项目。下面是已安装的依赖项:
karma
karma-html2js-preprocessor
karma-phantomjs-launcher
karma-chrome-launcher
karma-jasmine
karma-requirejs
karma-coffee-preprocessor
karma-junit-reporter
karma-script-launcher
karma-firefox-launcher
karma-ng-scenario
phantomjs在我看来,你没有安装幻影。
https://stackoverflow.com/questions/19726531
复制相似问题