我是AngularJs的新手,我目前正在将Jasmine与业力进行单元测试。但是我不确定AngularJs 1.5.3应该使用哪个版本的茉莉花。
我在Angular 1.5.1上使用过Jasmine v2.4.1,但这会引发错误。
Jasmine V - 2.4.1
Pakage.json file =>
{
"devDependencies": {
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-karma": "^0.8.3",
"karma": "^0.12.16",
"karma-chrome-launcher": "^2.2.0",
"karma-jasmine": "^0.1.5",
"karma-phantomjs-launcher": "^0.1.4",
"karma-xml-reporter": "^0.1.4",
"phantomjs": "^1.9.7-8"
},
"dependencies": {
"karma-jasmine-html-reporter": "^1.4.0"
}
}
karma-config file =>
files: [
//libraries
'js/lib/jquery.js',
'js/lib/bootstrap.js',
'js/angular/angular.js',
'js/lib/angular-sanitize.min.js',
'js/lib/angular-no-captcha.js',
'js/angular/ngStorage.js',
'js/angular/angular-route.js',
'js/lib/angular-mocks.js',
'js/lib/xml2json.js',
'js/lib/ui-bootstrap-tpls-1.3.2.js',
'js/angular/angular-animate.min.js',
'js/lib/angular-toastr.tpls.min.js',
'js/lib/loading-bar.min.js',
'js/lib/angular-social-links.js',
'js/lib/angular-tree-control.js',
'js/lib/ng-load.js',
'js/lib/FileSaver.min.js',
'js/lib/angular-location-update.min.js',
'js/lib/angular-google-analytics.min.js',
//Controllers
'js/app.js',
'js/init.js',
'js/common.services.js',
'js/controllers.js',
'js/controllers/*.js',
//Jasmine
'Scripts/jasmine/jasmine.css',
'Scripts/jasmine/jasmine.js',
'Scripts/jasmine/adapter.js',
'Scripts/jasmine/jasmine-html.js',
'Scripts/jasmine/boot.js',
'Scripts/jasmine/html.jasmine.reporter.js',
'TestScripts/DefaultTest.js'
],
Here is the error message displaying when I run karma-> Debug button