Testing service in Angular returns module is not defined

后端 未结 7 1179
借酒劲吻你
借酒劲吻你 2020-12-13 03:11

I am trying to run the default service unit test in my project (Taken from the Angular Seed project on GitHub), but I keep getting the error \"module is not defined\".

相关标签:
7条回答
  • 2020-12-13 03:53

    If you're using Yeoman and its angular-generator, you probably get this error. Especially when you do the Tutorial ( ._.)
    I fixed it, by copying the angular-mocks.js file, from the bower_components/angular-mocks dir to the test/mock dir. Of course you have to be sure, that your karma.conf.js file is configured correctly.
    Greetings!

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