diff --git a/jest.config.js b/jest.config.js index 51c0f879ae..992ca2f20b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -3,7 +3,11 @@ module.exports = { '@testing-library/jest-dom/extend-expect', './scripts/jest/setupTests.ts', ], - testPathIgnorePatterns: ['/node_modules/', '/examples/'], + testPathIgnorePatterns: [ + '/node_modules/', + '/examples/', + '/__utils__/', + ], snapshotSerializers: ['enzyme-to-json/serializer'], testEnvironment: 'jsdom', watchPlugins: [ diff --git a/packages/react-instantsearch-hooks-web/src/widgets/__testutils__/all-widgets.tsx b/packages/react-instantsearch-hooks-web/src/widgets/__tests__/__utils__/all-widgets.tsx similarity index 97% rename from packages/react-instantsearch-hooks-web/src/widgets/__testutils__/all-widgets.tsx rename to packages/react-instantsearch-hooks-web/src/widgets/__tests__/__utils__/all-widgets.tsx index ed46916118..3626c957da 100644 --- a/packages/react-instantsearch-hooks-web/src/widgets/__testutils__/all-widgets.tsx +++ b/packages/react-instantsearch-hooks-web/src/widgets/__tests__/__utils__/all-widgets.tsx @@ -5,8 +5,8 @@ import { InstantSearchServerContext, } from 'react-instantsearch-hooks'; -import * as widgets from '../'; -import { createSearchClient } from '../../../../../test/mock'; +import * as widgets from '../..'; +import { createSearchClient } from '../../../../../../test/mock'; import type { InstantSearch as InstantSearchClass } from 'instantsearch.js'; import type { ComponentProps } from 'react'; diff --git a/packages/react-instantsearch-hooks-web/src/widgets/__tests__/all-components.test.tsx b/packages/react-instantsearch-hooks-web/src/widgets/__tests__/all-components.test.tsx index fa31532137..1a878c5f67 100644 --- a/packages/react-instantsearch-hooks-web/src/widgets/__tests__/all-components.test.tsx +++ b/packages/react-instantsearch-hooks-web/src/widgets/__tests__/all-components.test.tsx @@ -4,7 +4,7 @@ import { render } from '@testing-library/react'; import React from 'react'; -import { getAllWidgets } from '../__testutils__/all-widgets'; +import { getAllWidgets } from './__utils__/all-widgets'; describe('rendering', () => { const widgets = getAllWidgets(); diff --git a/packages/react-instantsearch-hooks-web/src/widgets/__tests__/all-widgets.test.tsx b/packages/react-instantsearch-hooks-web/src/widgets/__tests__/all-widgets.test.tsx index aa9294f325..dffd681f11 100644 --- a/packages/react-instantsearch-hooks-web/src/widgets/__tests__/all-widgets.test.tsx +++ b/packages/react-instantsearch-hooks-web/src/widgets/__tests__/all-widgets.test.tsx @@ -2,7 +2,7 @@ * @jest-environment node */ -import { getAllInstantSearchWidgets } from '../__testutils__/all-widgets'; +import { getAllInstantSearchWidgets } from './__utils__/all-widgets'; describe('widgets', () => { const widgets = getAllInstantSearchWidgets(); diff --git a/tsconfig.declaration.json b/tsconfig.declaration.json index 512061bc80..7fedc49e19 100644 --- a/tsconfig.declaration.json +++ b/tsconfig.declaration.json @@ -5,5 +5,5 @@ "emitDeclarationOnly": true, "noEmit": false }, - "exclude": ["**/__tests__/**/*", "**/dist/**/*"] + "exclude": ["**/__tests__/**/*", "**/dist/**/*"], }