1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1x 1x 4x 1x 1x 1x | import { Response, ResponseOptions } from '@angular/http'; // Ref: https://stackoverflow.com/a/45171930/8745435 export class MockError extends Response implements Error { name: any; message: any; constructor(status: number, Ebody: string = '') { super(new ResponseOptions({status, body})); } } export class MockResponse extends Response { name: any; constructor(status: number, body: string = '') { super(new ResponseOptions({status, body})); } } |