Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('passes user agents', () => {
const addAlgoliaAgent = jest.fn();
algoliasearch.mockImplementation(() => {
return {
addAlgoliaAgent,
};
});
const ssrSearchClient = createSSRSearchClient({
appId: 'test',
apiKey: 'test',
httpClient: null,
HttpHeaders: null,
makeStateKey: null,
transferState: null,
});
expect(addAlgoliaAgent).toHaveBeenCalledTimes(3);
expect(addAlgoliaAgent).toHaveBeenCalledWith(