【发布时间】:2014-03-05 12:54:26
【问题描述】:
我在 AngularJs yeoman 脚手架内开始 karma。
错误“无法调用未定义的方法'模块'”在gruntfile.js中,由yeoman生成,第一行module.exports = function (grunt) { ...
karma.conf.js 是
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'**/*.js',
'app/bower_components/**/*.js'
],
exclude: [ ],
reporters: ['progress'],
// web server port
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
captureTimeout: 60000,
singleRun: false
});
};
angular.js 包含在 bower_components 中。
【问题讨论】:
标签: angularjs gruntjs yeoman karma-runner karma-jasmine