Skip to content

Commit

Permalink
remove clumsy console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
c4n4r committed May 2, 2024
1 parent fcf5b9d commit 9b5e4c7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions projects/reporter/src/lib/reporter.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ describe('Reporter management tests', () => {
});
const sendRequest = (httpClient: HttpClient, httpMock: HttpTestingController, method: string, url: string, status: number, payload: any) => {
// @ts-ignore
httpClient[method.toLowerCase()](url, payload).subscribe(
() => {},
(error: HttpErrorResponse) => {
expect(error.status).toBe(status);
}
);
httpClient[method](url, payload).subscribe((data) => {
return fail('Request should have failed with status : ' + status);
}, (error: HttpErrorResponse) => {
expect(error.status).toBe(status);
});

const req = httpMock.expectOne(url);
expect(req.request.method).toBe(method.toUpperCase());
req.flush('Error', {status, statusText: 'Error'});
tick();
}

0 comments on commit 9b5e4c7

Please sign in to comment.