0
我在搞業障,無法加載我的文件。我添加了一個文件數組到karma.config.js,我只是看到所有模塊的錯誤:錯誤:[$ injector:nomod]模塊'loginModule'不可用!Karma config找不到文件
'use strict';
module.exports = function(config) {
config.set({
autoWatch : false,
frameworks: ['jasmine'],
browsers : ['PhantomJS'],
plugins : [
'karma-phantomjs-launcher',
'karma-jasmine'
],
files: [
'./app/index.js',
'./app/**/*.js',
'./components/**/*.js'
]
});
};
// login.module.js
angular.module('loginModule', []);
[Angular模塊在Karma Jasmine測試運行中不可用]的可能副本(http://stackoverflow.com/questions/21700615/angular-module-not-available-in-karma-jasmine-test-run) – angmerica