(obs: Observable<any>)
| 24 | import {FetchBackend, FetchFactory, HTTP_FETCH_MAX_RESPONSE_SIZE} from '../src/fetch'; |
| 25 | |
| 26 | function trackEvents(obs: Observable<any>): Promise<any[]> { |
| 27 | return obs |
| 28 | .pipe( |
| 29 | // We don't want the promise to fail on HttpErrorResponse |
| 30 | catchError((e) => of(e)), |
| 31 | scan((acc, event) => { |
| 32 | acc.push(event); |
| 33 | return acc; |
| 34 | }, [] as any[]), |
| 35 | ) |
| 36 | .toPromise() as Promise<any[]>; |
| 37 | } |
| 38 | |
| 39 | const TEST_POST = new HttpRequest('POST', '/test', 'some body', { |
| 40 | responseType: 'text', |
no test coverage detected
searching dependent graphs…