Skip to content

Commit

Permalink
restore search_interceptor test
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Sep 29, 2023
1 parent 0214eb2 commit 9f3f920
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,25 @@ describe('SearchInterceptor', () => {
expect(fetchMock).toBeCalledTimes(1);
});

test('should deliver error to all replays', async () => {
const responses = [
{
time: 10,
value: {},
},
];

mockFetchImplementation(responses);

searchInterceptor.search(basicReq, { sessionId }).subscribe({ next, error, complete });
searchInterceptor.search(basicReq, { sessionId }).subscribe({ next, error, complete });
await timeTravel(10);
expect(fetchMock).toBeCalledTimes(1);
expect(error).toBeCalledTimes(2);
expect(error.mock.calls[0][0].message).toEqual('Aborted');
expect(error.mock.calls[1][0].message).toEqual('Aborted');
});

test('should ignore preference when hashing', async () => {
mockFetchImplementation(basicCompleteResponse);

Expand Down

0 comments on commit 9f3f920

Please sign in to comment.