我是angularJS单元测试的新手,我添加了一个新的单元测试,但我遇到了这个问题:
Error: [$injector:modulerr] Failed to instantiate module FeeBuddy due to:
Error: [$injector:modulerr] Failed to instantiate module ngMaterial due to:
Error: [$injector:nomod] Module 'ngMaterial' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
这是我的karma.conf.js
文件dependecies调用:
files: [
'node_modules/angular/angular.js',
'node_modules/angular-mocks/angular-mocks.js',
'node_modules/angular-ui-router/release/angular-ui-router.js',
//'node_modules/angular-material/angular-material.js',
'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.js',
'public/js/vendor/materialPreloader.min.js',
'js/server.config.js',
'js/main.controller.js',
'js/controllers/*.js',
'js/services/*.js',
'js/directives/*.js',
'js/factories/*.js',
'js/components/*.js',
'js/modules/**/*.js',
'js/routes.js',
'js/modules.js',
'js/module.js',
'js/filters/*.js',
'js/modules/**/module.js',
'js/dependecies.js',
'test/unit/*.js'
],
即使我取消注释node_modules/angular-material/angular-material.js
仍然有同样的问题