How can I test an Angular 2 ErrorHandler implementation?
问题 I have overridden the @angular/core ErrorHandler and I am trying to test it, however I am getting an error. The service works properly but the test fails somewhere. exception-handler.service.ts import { Injectable, ErrorHandler, forwardRef, Inject } from '@angular/core'; import { BkHttp } from './http.service'; @Injectable() export class BkExceptionHandlerService implements ErrorHandler { constructor( private bkHttp: BkHttp) { } handleError(error) { let originalError = this.controlError(error