Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

NullInjectorError: R3InjectorError(DynamicTestModule)[AdminTestCentersComponent -> ToastrService -> InjectionToken ToastConfig -> InjectionToken ToastConfig]: NullInjectorError: No provider for InjectionToken ToastConfig!

// Angular - Jasmine
// Error: NullInjectorError: R3InjectorError(DynamicTestModule)[AdminTestCentersComponent -> ToastrService -> InjectionToken ToastConfig -> InjectionToken ToastConfig]: NullInjectorError: No provider for InjectionToken ToastConfig!

beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [ToastrModule.forRoot()],

    })
      .compileComponents();
}));
 
PREVIOUS NEXT
Tagged: #ToastrService #InjectionToken #ToastConfig #InjectionToken #No #provider #InjectionToken
ADD COMMENT
Topic
Name
9+2 =