;
7 | };
8 |
--------------------------------------------------------------------------------
/packages/react-instantsearch/src/types/index.ts:
--------------------------------------------------------------------------------
1 | export * from './PartialKeys';
2 | export * from './Translatable';
3 |
--------------------------------------------------------------------------------
/packages/react-instantsearch/src/ui/InternalHighlight.tsx:
--------------------------------------------------------------------------------
1 | import { createHighlightComponent } from 'instantsearch-ui-components';
2 | import { createElement, Fragment } from 'react';
3 |
4 | import type { Pragma } from 'instantsearch-ui-components';
5 |
6 | export const InternalHighlight = createHighlightComponent({
7 | createElement: createElement as Pragma,
8 | Fragment,
9 | });
10 |
--------------------------------------------------------------------------------
/packages/react-instantsearch/src/ui/lib/capitalize.ts:
--------------------------------------------------------------------------------
1 | export function capitalize(text: string): string {
2 | return text.toString().charAt(0).toUpperCase() + text.toString().slice(1);
3 | }
4 |
--------------------------------------------------------------------------------
/packages/react-instantsearch/src/ui/lib/index.ts:
--------------------------------------------------------------------------------
1 | export * from './capitalize';
2 | export * from './isModifierClick';
3 |
--------------------------------------------------------------------------------
/packages/react-instantsearch/src/ui/lib/isModifierClick.ts:
--------------------------------------------------------------------------------
1 | import type React from 'react';
2 |
3 | export function isModifierClick(event: React.MouseEvent) {
4 | const isMiddleClick = event.button === 1;
5 |
6 | return Boolean(
7 | isMiddleClick ||
8 | event.altKey ||
9 | event.ctrlKey ||
10 | event.metaKey ||
11 | event.shiftKey
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/packages/react-instantsearch/test/module/is-cjs-module.cjs:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-console */
2 |
3 | const assert = require('assert');
4 |
5 | const ReactInstantSearch = require('react-instantsearch');
6 |
7 | assert.ok(ReactInstantSearch);
8 |
9 | console.log('react-instantsearch is valid CJS');
10 |
--------------------------------------------------------------------------------
/packages/react-instantsearch/test/module/is-es-module.mjs:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-console */
2 | import assert from 'assert';
3 |
4 | import * as ReactInstantSearch from 'react-instantsearch';
5 |
6 | assert.ok(ReactInstantSearch);
7 |
8 | console.log('react-instantsearch is valid ESM');
9 |
--------------------------------------------------------------------------------
/packages/react-instantsearch/tsconfig.declaration.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.declaration"
3 | }
4 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/.storybook/addons.js:
--------------------------------------------------------------------------------
1 | import '@storybook/addon-knobs/register';
2 | import '@storybook/addon-options/register';
3 | import '@storybook/addon-actions/register';
4 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/src/components/ExperimentalDynamicWidgets.js:
--------------------------------------------------------------------------------
1 | import { warn } from '../util/warn';
2 |
3 | import AisDynamicWidgets from './DynamicWidgets';
4 |
5 | // @MAJOR remove this file
6 | export default Object.assign({}, AisDynamicWidgets, {
7 | name: 'AisExperimentalDynamicWidgets',
8 | mounted() {
9 | warn('Use AisDynamicWidgets instead of AisExperimentalDynamicWidgets.');
10 | },
11 | });
12 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/src/components/__tests__/__snapshots__/Configure.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`renders with scoped slots 1`] = `
4 |
5 |
6 | hitsPerPage: 5
7 |
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/src/components/__tests__/__snapshots__/InstantSearch.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`renders correctly (empty) 1`] = `
4 |
5 |
6 | `;
7 |
8 | exports[`renders correctly (with slot used) 1`] = `
9 |
10 |
11 | Hi there, this is the main slot
12 |
13 |
14 | `;
15 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/src/components/__tests__/__snapshots__/SortBy.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`renders with scoped slots 1`] = `
4 |
5 |
16 |
17 | `;
18 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/src/components/__tests__/__snapshots__/__Template.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`renders correctly 1`] = `
4 |
5 |
8 |
9 | `;
10 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/src/instantsearch.js:
--------------------------------------------------------------------------------
1 | export { createSuitMixin } from './mixins/suit';
2 | export { createWidgetMixin } from './mixins/widget';
3 | export * from './widgets';
4 | export { plugin as default } from './plugin';
5 | export { createServerRootMixin } from './util/createServerRootMixin';
6 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/src/instantsearch.umd.js:
--------------------------------------------------------------------------------
1 | import { plugin } from './plugin';
2 | import { isVue2 } from './util/vue-compat';
3 |
4 | // Automatically register Algolia Search components if Vue 2.x is available globally.
5 | if (typeof window !== 'undefined' && window.Vue && isVue2) {
6 | window.Vue.use(plugin);
7 | }
8 |
9 | export { createSuitMixin } from './mixins/suit';
10 | export { createWidgetMixin } from './mixins/widget';
11 | export * from './widgets';
12 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/src/mixins/__mocks__/panel.js:
--------------------------------------------------------------------------------
1 | export const createPanelProviderMixin = jest.fn(() => ({}));
2 |
3 | export const createPanelConsumerMixin = jest.fn(() => ({}));
4 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/src/plugin.js:
--------------------------------------------------------------------------------
1 | /* eslint import/namespace: ['error', { allowComputed: true }]*/
2 |
3 | import * as widgets from './widgets';
4 |
5 | export const plugin = {
6 | install(localVue) {
7 | Object.keys(widgets).forEach((widgetName) => {
8 | localVue.component(widgets[widgetName].name, widgets[widgetName]);
9 | });
10 | },
11 | };
12 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/src/util/testutils/client.js:
--------------------------------------------------------------------------------
1 | export const createFakeClient = () => ({
2 | search: jest.fn((requests) =>
3 | Promise.resolve({
4 | results: requests.map(({ params: { query } }) => ({ query })),
5 | })
6 | ),
7 | });
8 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/src/util/vue-compat/Highlighter/index-vue2.js:
--------------------------------------------------------------------------------
1 | export { default } from './Highlighter-vue2.vue';
2 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/src/util/vue-compat/Highlighter/index-vue3.js:
--------------------------------------------------------------------------------
1 | export { default } from '../../../components/Highlighter';
2 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/src/util/vue-compat/Highlighter/index.js:
--------------------------------------------------------------------------------
1 | export { default } from './index-vue2';
2 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/src/util/vue-compat/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | By default, we maintain this repository based on Vue 2.
3 | That's why this file is exporting from `index-vue2`,
4 | which includes all the variables and methods for Vue 2.
5 | When `scripts/build-vue3.sh` runs, it will replace with
6 | > export * from './index-vue3';
7 | and revert it back after finished.
8 | */
9 | export * from './index-vue2';
10 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/src/util/warn.js:
--------------------------------------------------------------------------------
1 | const cache = new Set();
2 |
3 | export function warn(message) {
4 | if (cache.has(message)) return;
5 | cache.add(message);
6 | // eslint-disable-next-line no-console
7 | console.warn(message);
8 | }
9 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/stories/MemoryRouter.js:
--------------------------------------------------------------------------------
1 | export class MemoryRouter {
2 | constructor(initialState = {}) {
3 | this._memoryState = initialState;
4 | }
5 | write(routeState) {
6 | this._memoryState = routeState;
7 | }
8 | read() {
9 | return this._memoryState;
10 | }
11 | createURL() {
12 | return '';
13 | }
14 | onUpdate() {
15 | return {};
16 | }
17 | dispose() {}
18 | }
19 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/test/module/vue2/is-cjs-module.cjs:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-console */
2 |
3 | const assert = require('assert');
4 |
5 | const VueInstantSearch2 = require('vue-instantsearch/vue2/cjs/index.js');
6 |
7 | assert.ok(VueInstantSearch2);
8 |
9 | console.log('vue-instantsearch/vue2 is valid CJS');
10 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/test/module/vue2/is-es-module.mjs:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-console */
2 |
3 | import assert from 'assert';
4 |
5 | import * as VueInstantSearch2 from 'vue-instantsearch/vue2/es/index.js';
6 | import * as Vue2Widgets from 'vue-instantsearch/vue2/es/src/widgets.js';
7 |
8 | assert.ok(VueInstantSearch2);
9 | assert.ok(Vue2Widgets);
10 |
11 | console.log('vue-instantsearch/vue2 is valid ESM');
12 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/test/module/vue3/is-cjs-module.cjs:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-console */
2 |
3 | const assert = require('assert');
4 |
5 | const VueInstantSearch3 = require('vue-instantsearch/vue3/cjs/index.js');
6 |
7 | assert.ok(VueInstantSearch3);
8 |
9 | console.log('vue-instantsearch/vue3 is valid CJS');
10 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/test/module/vue3/is-es-module.mjs:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-console */
2 |
3 | import assert from 'assert';
4 |
5 | import * as VueInstantSearch3 from 'vue-instantsearch/vue3/es/index.js';
6 | import * as Vue3Widgets from 'vue-instantsearch/vue3/es/src/widgets.js';
7 |
8 | assert.ok(VueInstantSearch3);
9 | assert.ok(Vue3Widgets);
10 |
11 | console.log('vue-instantsearch/vue3 is valid ESM');
12 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/test/utils/sortedHtmlSerializer.js:
--------------------------------------------------------------------------------
1 | import createSerializer from 'jest-serializer-html/createSerializer';
2 |
3 | expect.addSnapshotSerializer(
4 | createSerializer({
5 | print: {
6 | sortAttributes: (names) => names.sort(),
7 | },
8 | })
9 | );
10 |
--------------------------------------------------------------------------------
/packages/vue-instantsearch/vue-instantsearch-readme.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/packages/vue-instantsearch/vue-instantsearch-readme.png
--------------------------------------------------------------------------------
/scripts/.eslintrc.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 |
3 | module.exports = {
4 | extends: path.join(__dirname, '..', '.eslintrc.js'),
5 | rules: {
6 | 'import/no-commonjs': 'off',
7 | 'no-console': 'off',
8 | },
9 | };
10 |
--------------------------------------------------------------------------------
/scripts/wdio/local.conf.js:
--------------------------------------------------------------------------------
1 | exports.config = {
2 | ...require('@instantsearch/e2e-tests').local,
3 | // you can override the default options if needed here
4 | };
5 |
--------------------------------------------------------------------------------
/scripts/wdio/saucelabs.conf.js:
--------------------------------------------------------------------------------
1 | exports.config = {
2 | ...require('@instantsearch/e2e-tests').saucelabs,
3 | };
4 |
--------------------------------------------------------------------------------
/specs/.gitignore:
--------------------------------------------------------------------------------
1 | # build output
2 | dist/
3 |
4 | # dependencies
5 | node_modules/
6 |
7 | # logs
8 | npm-debug.log*
9 | yarn-debug.log*
10 | yarn-error.log*
11 | pnpm-debug.log*
12 |
13 |
14 | # environment variables
15 | .env
16 | .env.production
17 |
18 | # macOS-specific files
19 | .DS_Store
20 |
21 | /public
22 | /themes
23 |
--------------------------------------------------------------------------------
/specs/astro.config.mjs:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'astro/config';
2 |
3 | export default defineConfig({
4 | site: 'https://instantsearchjs.netlify.app/',
5 | base: '/specs',
6 | outDir: '../website/specs',
7 | });
8 |
--------------------------------------------------------------------------------
/specs/src/components/WidgetsList.astro:
--------------------------------------------------------------------------------
1 | ---
2 | const allWidgets = await Astro.glob('../pages/widgets/*.md');
3 | ---
4 |
5 |
17 |
--------------------------------------------------------------------------------
/specs/src/config.ts:
--------------------------------------------------------------------------------
1 | export const GITHUB_EDIT_URL = `https://github.com/algolia/instantsearch/edit/master`;
2 |
--------------------------------------------------------------------------------
/specs/src/env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/specs/src/pages/index.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import MainLayout from '../layouts/MainLayout.astro';
3 |
4 | const { BASE_URL } = import.meta.env;
5 | ---
6 |
7 |
8 |
9 |
Common specifications for InstantSearch
10 |
View widgets
11 |
12 |
13 |
--------------------------------------------------------------------------------
/specs/src/pages/widgets/configure.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: ../../layouts/WidgetLayout.astro
3 | title: Configure
4 | type: widget
5 | options:
6 | - name: (all parameters)
7 | description: Each parameter will be translated to a [search parameter](https://www.algolia.com/doc/api-reference/search-api-parameters/)
8 | ---
9 |
--------------------------------------------------------------------------------
/specs/src/pages/widgets/stats.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: ../../layouts/WidgetLayout.astro
3 | title: Stats
4 | type: widget
5 | html: |
6 |
7 | 20,337 results found in 1ms.
8 |
9 | classes:
10 | - name: .ais-Stats
11 | description: the root div of the widget
12 | - name: .ais-Stats-text
13 | description: the text of the widget
14 | ---
15 |
--------------------------------------------------------------------------------
/specs/src/types.ts:
--------------------------------------------------------------------------------
1 | export type WidgetFrontmatter = {
2 | title: string;
3 | html?: string;
4 | alt1?: string;
5 | althtml1?: string;
6 | alt2?: string;
7 | althtml2?: string;
8 | info?: string;
9 | classes?: Array<{ name: string; description: string }>;
10 | options?: Array<{ name: string; description: string; default?: string }>;
11 | translations?: Array<{ name: string; description: string; default?: string }>;
12 | };
13 |
--------------------------------------------------------------------------------
/specs/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "astro/tsconfigs/strict",
3 | "compilerOptions": {
4 | "jsx": "preserve",
5 | "skipLibCheck": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/tests/babel-testfixture/nested/index/index.js:
--------------------------------------------------------------------------------
1 | // @instantsearch/babel-testfixture/nested/index/index.js
2 |
--------------------------------------------------------------------------------
/tests/babel-testfixture/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@instantsearch/babel-testfixture",
3 | "private": true,
4 | "description": "A package to use as a test in extension-resolver",
5 | "version": "0.0.1",
6 | "main": "nested/index"
7 | }
8 |
--------------------------------------------------------------------------------
/tests/common/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "jest/no-export": "off",
4 | "no-lone-blocks": "off"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/tests/common/index.ts:
--------------------------------------------------------------------------------
1 | export * from './connectors';
2 | export * from './widgets';
3 | export * from './shared';
4 | export * from './common';
5 |
--------------------------------------------------------------------------------
/tests/common/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@instantsearch/tests",
3 | "private": true,
4 | "version": "1.74.0",
5 | "description": "Common tests for all InstantSearch flavors.",
6 | "dependencies": {
7 | "instantsearch.js": "4.78.3"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/tests/e2e/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | npm-debug.log
3 | yarn-error.log
4 | .DS_Store
5 | tests/*
6 | !tests/*.sh
7 |
--------------------------------------------------------------------------------
/tests/e2e/helpers/getCurrentPage.ts:
--------------------------------------------------------------------------------
1 | declare namespace WebdriverIOAsync {
2 | interface Browser {
3 | getCurrentPage: () => Promise;
4 | }
5 | }
6 |
7 | browser.addCommand('getCurrentPage', async () => {
8 | const page = await browser.$('.ais-Pagination-item--selected');
9 |
10 | return Number(await page.getText());
11 | });
12 |
--------------------------------------------------------------------------------
/tests/e2e/helpers/getHitsPerPage.ts:
--------------------------------------------------------------------------------
1 | declare namespace WebdriverIOAsync {
2 | interface Browser {
3 | getHitsPerPage: () => Promise;
4 | }
5 | }
6 |
7 | browser.addCommand('getHitsPerPage', async () => {
8 | const hitsPerPage = await browser.$('.ais-HitsPerPage-select');
9 |
10 | return Number(await hitsPerPage.getValue());
11 | });
12 |
--------------------------------------------------------------------------------
/tests/e2e/helpers/getHitsTitles.ts:
--------------------------------------------------------------------------------
1 | declare namespace WebdriverIOAsync {
2 | interface Browser {
3 | getHitsTitles: () => Promise;
4 | }
5 | }
6 |
7 | browser.addCommand('getHitsTitles', () =>
8 | browser.getTextFromSelector('.hit h1')
9 | );
10 |
--------------------------------------------------------------------------------
/tests/e2e/helpers/getSearchBoxValue.ts:
--------------------------------------------------------------------------------
1 | declare namespace WebdriverIOAsync {
2 | interface Browser {
3 | getSearchBoxValue: () => Promise;
4 | }
5 | }
6 |
7 | browser.addCommand('getSearchBoxValue', async () => {
8 | const searchBox = await browser.$('.ais-SearchBox [type=search]');
9 |
10 | return searchBox.getValue();
11 | });
12 |
--------------------------------------------------------------------------------
/tests/e2e/helpers/getSelectedRatingMenuItem.ts:
--------------------------------------------------------------------------------
1 | declare namespace WebdriverIOAsync {
2 | interface Browser {
3 | getSelectedRatingMenuItem: () => Promise;
4 | }
5 | }
6 |
7 | browser.addCommand('getSelectedRatingMenuItem', async () => {
8 | const rating = await browser.$(
9 | '.ais-RatingMenu-item--selected .ais-RatingMenu-link'
10 | );
11 |
12 | return rating.getAttribute('aria-label');
13 | });
14 |
--------------------------------------------------------------------------------
/tests/e2e/helpers/getSelectedRefinementListItem.ts:
--------------------------------------------------------------------------------
1 | declare namespace WebdriverIOAsync {
2 | interface Browser {
3 | getSelectedRefinementListItem: () => Promise;
4 | }
5 | }
6 |
7 | browser.addCommand('getSelectedRefinementListItem', async () => {
8 | const item = await browser.$(
9 | '.ais-RefinementList-item--selected .ais-RefinementList-labelText'
10 | );
11 | return await item.getText();
12 | });
13 |
--------------------------------------------------------------------------------
/tests/e2e/helpers/getSortByValue.ts:
--------------------------------------------------------------------------------
1 | declare namespace WebdriverIOAsync {
2 | interface Browser {
3 | getSortByValue: () => Promise;
4 | }
5 | }
6 |
7 | browser.addCommand('getSortByValue', async () => {
8 | const sortBy = await browser.$('.ais-SortBy-select');
9 |
10 | return sortBy.getValue();
11 | });
12 |
--------------------------------------------------------------------------------
/tests/e2e/helpers/getToggleRefinementStatus.ts:
--------------------------------------------------------------------------------
1 | declare namespace WebdriverIOAsync {
2 | interface Browser {
3 | getToggleRefinementStatus: () => Promise;
4 | }
5 | }
6 |
7 | browser.addCommand('getToggleRefinementStatus', async () => {
8 | const checkbox = await browser.$('.ais-ToggleRefinement-checkbox');
9 |
10 | return checkbox.isSelected();
11 | });
12 |
--------------------------------------------------------------------------------
/tests/e2e/helpers/waitForElement.ts:
--------------------------------------------------------------------------------
1 | declare namespace WebdriverIOAsync {
2 | interface Browser {
3 | waitForElement: (selector: string) => Promise;
4 | }
5 | }
6 |
7 | browser.addCommand('waitForElement', (selector: string) =>
8 | browser.waitUntil(
9 | async () => (await browser.$$(selector)).length > 0,
10 | undefined,
11 | `Element matching selector "${selector}" wasn't found`
12 | )
13 | );
14 |
--------------------------------------------------------------------------------
/tests/e2e/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | local: require('./wdio.local.conf'),
3 | saucelabs: require('./wdio.saucelabs.conf'),
4 | };
5 |
--------------------------------------------------------------------------------
/tests/mocks/fixtures/index.ts:
--------------------------------------------------------------------------------
1 | export * from './recommendations';
2 |
--------------------------------------------------------------------------------
/tests/mocks/index.ts:
--------------------------------------------------------------------------------
1 | export * from './createAPIResponse';
2 | export * from './createCompositionClient';
3 | export * from './createInsightsClient';
4 | export * from './createSearchClient';
5 | export * from './createAlgoliaSearchClient';
6 |
--------------------------------------------------------------------------------
/tests/mocks/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@instantsearch/mocks",
3 | "version": "1.74.0",
4 | "private": true,
5 | "dependencies": {
6 | "algoliasearch-helper": "3.25.0",
7 | "instantsearch.js": "4.78.3"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/tests/utils/castToJestMock.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Assert that a function is actually a mocked function.
3 | */
4 | export const castToJestMock = any>(
5 | func: TFunction
6 | ) => func as jest.MockedFunction;
7 |
--------------------------------------------------------------------------------
/tests/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './castToJestMock';
2 | export * from './createInstantSearchSpy';
3 | export * from './enzyme';
4 | export * from './InstantSearchTestWrapper';
5 | export * from './normalizeSnapshot';
6 | export * from './runAllMicroTasks';
7 | export * from './wait';
8 | export * from './widgetSnapshotSerializer';
9 |
--------------------------------------------------------------------------------
/tests/utils/matchers/index.ts:
--------------------------------------------------------------------------------
1 | export * from './toMatchNormalizedInlineSnapshot';
2 | export * from './toWarnDev';
3 | export * from './vue';
4 |
--------------------------------------------------------------------------------
/tests/utils/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@instantsearch/testutils",
3 | "version": "1.63.0",
4 | "private": true,
5 | "dependencies": {
6 | "@types/enzyme": "3.1.15",
7 | "enzyme": "3.11.0",
8 | "enzyme-adapter-preact-pure": "2.2.0",
9 | "enzyme-to-json": "3.6.2",
10 | "instantsearch.js": "4.78.3",
11 | "jest-serializer-html": "7.1.0",
12 | "preact": "^10.10.0"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/tests/utils/runAllMicroTasks.ts:
--------------------------------------------------------------------------------
1 | export const runAllMicroTasks = () => Promise.resolve();
2 |
--------------------------------------------------------------------------------
/tests/utils/wait.ts:
--------------------------------------------------------------------------------
1 | /** Promise for a timeout of a certain number of ms */
2 | export const wait = (ms: number = 0) =>
3 | new Promise((resolve) => setTimeout(resolve, ms));
4 |
--------------------------------------------------------------------------------
/tsconfig.declaration.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig",
3 | "compilerOptions": {
4 | "declaration": true,
5 | "emitDeclarationOnly": true,
6 | "noEmit": false
7 | },
8 | "exclude": ["**/__tests__/**/*", "**/dist/**/*"],
9 | }
10 |
--------------------------------------------------------------------------------
/tsconfig.v4.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig",
3 | "exclude": [
4 | "**/es",
5 | "**/dist",
6 | "tests/e2e",
7 | "examples/react/next/next-env.d.ts",
8 | "examples/react/react-native",
9 | "packages/create-instantsearch-app/src/templates/**/*",
10 | "packages/algolia-experiences"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/website/stories/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algolia/instantsearch/5a2d2121c1f82840e59ba69edfe0a4f41450f41b/website/stories/.gitkeep
--------------------------------------------------------------------------------