Open rrchai opened 2 years ago
errors raised from jest testing and how to solve it:
add import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
Unexpected synthetic property @transitionMessages found. Please make sure that:
- Either `BrowserAnimationsModule` or `NoopAnimationsModule` are imported in your application.
- There is corresponding configuration for the animation named `@transitionMessages` defined in the `animations` field of the `@Component` decorator (see https://angular.io/api/core/Component#animations).
add import { RouterTestingModule } from '@angular/router/testing';
NullInjectorError: R3InjectorError(DynamicTestModule)[Router -> Router]:
NullInjectorError: No provider for Router!
add import { HttpClientModule } from '@angular/common/http';
NullInjectorError: R3InjectorError(DynamicTestModule)[AuthService -> AuthService -> HttpClient -> HttpHandler -> HttpHandler]:
NullInjectorError: No provider for HttpHandler!
It means you are missing corresponding module and you would need to import the module in the *.spec.ts file
'xxx' is an Angular component, then verify that it is part of this module
or
Export of name 'xxx' not found!
Resources: