I am writing the unit test cases for the Angular 8 app. This is the hybrid application with AngularJs + Angular 8.
I'm getting following error:
NullInjectorError: StaticInjectorError(DynamicTestModule)[TestService -> $injector]:
StaticInjectorError(Platform: core)[TestService -> $injector]:
NullInjectorError: No provider for $injector!
I'm not sure, how to mock $injector class. I tried the mock the TestService
, I won't be able to cover some integration test cases in that scenario.
Any help in mocking $injector class would be appreciated.