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
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ describe('createAlgoliaInsightsPlugin', () => {
expect(document.body).toMatchInlineSnapshot(`
<body>
<script
src="https://cdn.jsdelivr.net/npm/search-insights@2.4.0/dist/search-insights.min.js"
src="https://cdn.jsdelivr.net/npm/search-insights@2.6.0/dist/search-insights.min.js"
/>
<form>
<input />
Expand All @@ -243,7 +243,7 @@ describe('createAlgoliaInsightsPlugin', () => {
`);
expect((window as any).AlgoliaAnalyticsObject).toBe('aa');
expect((window as any).aa).toEqual(expect.any(Function));
expect((window as any).aa.version).toBe('2.4.0');
expect((window as any).aa.version).toBe('2.6.0');
});

it('notifies when the script fails to be added', () => {
Expand Down Expand Up @@ -736,7 +736,7 @@ describe('createAlgoliaInsightsPlugin', () => {
test('sends a `clickedObjectIDsAfterSearch` event with additional parameters if client supports it', async () => {
const insightsClient = jest.fn();
// @ts-ignore
insightsClient.version = '2.4.0';
insightsClient.version = '2.6.0';
const insightsPlugin = createAlgoliaInsightsPlugin({ insightsClient });

const { inputElement } = createPlayground(createAutocomplete, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
} from './types';

const VIEW_EVENT_DELAY = 400;
const ALGOLIA_INSIGHTS_VERSION = '2.4.0';
const ALGOLIA_INSIGHTS_VERSION = '2.6.0';
const ALGOLIA_INSIGHTS_SRC = `https://cdn.jsdelivr.net/npm/search-insights@${ALGOLIA_INSIGHTS_VERSION}/dist/search-insights.min.js`;

type SendViewedObjectIDsParams = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function createSearchInsightsApi(searchInsights: InsightsClient) {
'X-Algolia-API-Key': apiKey,
};

searchInsights(method, ...payloads, { headers } as any);
searchInsights(method, ...payloads, { headers });
} else {
searchInsights(method, ...payloads);
}
Expand Down