Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
test: fix typings in mock data
Browse files Browse the repository at this point in the history
  • Loading branch information
kristw committed Jun 10, 2019
1 parent 9134fa9 commit 6da6079
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/superset-ui-connection/test/SupersetClientClass.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,13 @@ describe('SupersetClientClass', () => {
const mockPutUrl = `${protocol}//${host}${mockPutEndpoint}`;
const mockDeleteUrl = `${protocol}//${host}${mockDeleteEndpoint}`;
const mockTextJsonResponse = '{ "value": 9223372036854775807 }';
const mockPayload = { json: () => Promise.resolve('payload') };

fetchMock.get(mockGetUrl, { json: 'payload' });
fetchMock.post(mockPostUrl, { json: 'payload' });
fetchMock.put(mockPutUrl, { json: 'payload' });
fetchMock.delete(mockDeleteUrl, { json: 'payload' });
fetchMock.delete(mockRequestUrl, { json: 'payload' });
fetchMock.get(mockGetUrl, mockPayload);
fetchMock.post(mockPostUrl, mockPayload);
fetchMock.put(mockPutUrl, mockPayload);
fetchMock.delete(mockDeleteUrl, mockPayload);
fetchMock.delete(mockRequestUrl, mockPayload);
fetchMock.get(mockTextUrl, mockTextJsonResponse);
fetchMock.post(mockTextUrl, mockTextJsonResponse);

Expand Down

0 comments on commit 6da6079

Please sign in to comment.