Skip to content

Commit

Permalink
fix: Add 'http' property to serviceContextMock and update test expect…
Browse files Browse the repository at this point in the history
…ations

Signed-off-by: kishor82 <[email protected]>
  • Loading branch information
kishor82 committed Sep 7, 2023
1 parent a81fa27 commit 00698cc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ describe('useSendCurrentRequestToOpenSearch', () => {

const { result } = renderHook(() => useSendCurrentRequestToOpenSearch(), { wrapper: contexts });
await act(() => result.current());
expect(sendRequestToOpenSearch).toHaveBeenCalledWith({ requests: ['test'] });
expect(sendRequestToOpenSearch).toHaveBeenCalledWith({
requests: ['test'],
http: mockContextValue.services.http,
});

// Second call should be the request success
const [, [requestSucceededCall]] = (dispatch as jest.Mock).mock.calls;
Expand Down

0 comments on commit 00698cc

Please sign in to comment.