Jasmine test does not see AngularJS module

后端 未结 2 637
说谎
说谎 2020-12-29 21:04

I am trying to unit test an Angular service with a Jasmine spec file. This requires that a module be loaded. Here is a simple spec designed in an attempt to simply load the

相关标签:
2条回答
  • 2020-12-29 21:23

    This is probably a remote chance but I had that same issue and found out that my angular-mocks.js file had become corrupted, there was HTML in it. I have no idea how it got there. So, if you are getting this error after trying ever fix, double check all your js files to make sure none of them are messed up or corrupted.

    0 讨论(0)
  • 2020-12-29 21:33

    Make sure you include http://code.angularjs.org/1.1.0/angular-mocks.js for the angular-jasmine-helper functions like module.

    0 讨论(0)
提交回复
热议问题