Karma error - Unknown provider: $$asyncCallbackProvider

后端 未结 3 606
天涯浪人
天涯浪人 2021-01-17 20:55

Trying to run my karma test through grunt but getting an error:

Error: [$injector:modulerr] Failed to instantiate module ngMock due to:
Error: [$injector:unp         


        
3条回答
  •  清酒与你
    2021-01-17 21:22

    You should add all the angular dependencies that you used in your project to your karma.conf.js file. It seems like you need to add ngMock to your karma file, like the example below :

        files: [
             '*/**/angula-ngMock.js'
        ],
    

提交回复
热议问题