Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion __tests__/networkLogger.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ describe('NetworkLogger Module', () => {
});

it('should test that apollo handler called with catch error', async () => {
const operation = {};
const operation = {
setContext : (callback) => callback({ headers: {} }),
};
const forward = jest.fn();

NetworkLogger.apolloLinkRequestHandler(operation, forward);
Expand Down
4 changes: 2 additions & 2 deletions __tests__/xhrNetworkInterceptor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ describe('Network Interceptor', () => {
done();
})
FakeRequest.open(method, url);
FakeRequest.setResponseType('text')
FakeRequest.setResponseType('json')
FakeRequest.send();
FakeRequest.mockResponse(requests[0], null, JSON.stringify(responseBody));
});
Expand Down Expand Up @@ -213,7 +213,7 @@ describe('Network Interceptor', () => {
});
FakeRequest.open(method, url);
FakeRequest.setRequestHeaders(headers);
FakeRequest.setResponseType('text');
FakeRequest.setResponseType('json');
FakeRequest.send();
FakeRequest.mockResponse(requests[0], null, JSON.stringify(responseBody));
});
Expand Down