📌  相关文章
📜  NullInjectorError:R3InjectorError(DynamicTestModule)[AdminTestCentersComponent -> ToastrService -> InjectionToken ToastConfig -> InjectionToken ToastConfig]:NullInjectorError:没有 InjectionToken ToastConfig 的提供者! - 打字稿代码示例

📅  最后修改于: 2022-03-11 14:48:28.891000             🧑  作者: Mango

代码示例1
// 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();
}));