diff --git a/docs/dom-testing-library/example-intro.mdx b/docs/dom-testing-library/example-intro.mdx index 12f11427..891ecb16 100644 --- a/docs/dom-testing-library/example-intro.mdx +++ b/docs/dom-testing-library/example-intro.mdx @@ -17,7 +17,7 @@ import { waitFor, } from '@testing-library/dom' // adds special assertions like toHaveTextContent -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' function getExampleDOM() { // This is just a raw example of setting up some DOM diff --git a/docs/ecosystem-user-event.mdx b/docs/ecosystem-user-event.mdx index 47219524..5c7abf72 100644 --- a/docs/ecosystem-user-event.mdx +++ b/docs/ecosystem-user-event.mdx @@ -444,7 +444,7 @@ Options: ```jsx import React from 'react' import {render, screen} from '@testing-library/react' -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' import userEvent from '@testing-library/user-event' it('should cycle elements in document tab order', () => { diff --git a/docs/example-reach-router.mdx b/docs/example-reach-router.mdx index 34d39e24..742e1473 100644 --- a/docs/example-reach-router.mdx +++ b/docs/example-reach-router.mdx @@ -13,7 +13,7 @@ import { createMemorySource, LocationProvider, } from '@reach/router' -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' const About = () =>
You are on the about page
const Home = () =>
You are home
diff --git a/docs/example-react-context.mdx b/docs/example-react-context.mdx index 67c63d3f..212365e3 100644 --- a/docs/example-react-context.mdx +++ b/docs/example-react-context.mdx @@ -6,7 +6,7 @@ title: React Context ```jsx import React from 'react' import {render, screen} from '@testing-library/react' -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' import {NameContext, NameProvider, NameConsumer} from '../react-context' /** diff --git a/docs/example-react-intl.mdx b/docs/example-react-intl.mdx index d4b92c8e..0daee8a0 100644 --- a/docs/example-react-intl.mdx +++ b/docs/example-react-intl.mdx @@ -103,7 +103,7 @@ export {render} ```jsx import React from 'react' -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' // We're importing from our own created test-utils and not RTL's import {render, screen, setupTests} from '../test-utils.js' import {FormattedDate} from 'react-intl' diff --git a/docs/example-react-router.mdx b/docs/example-react-router.mdx index 2c20c1a1..00ae687c 100644 --- a/docs/example-react-router.mdx +++ b/docs/example-react-router.mdx @@ -51,7 +51,7 @@ import {createMemoryHistory} from 'history' import React from 'react' import {Router} from 'react-router-dom' -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' import {App, LocationDisplay} from './app' diff --git a/docs/guide-disappearance.mdx b/docs/guide-disappearance.mdx index 5e0a2dcf..b74130a6 100644 --- a/docs/guide-disappearance.mdx +++ b/docs/guide-disappearance.mdx @@ -97,7 +97,7 @@ in the body of the document, or not. This can be more meaningful than asserting a query result is `null`. ```javascript -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' // use `queryBy` to avoid throwing an error with `getBy` const submitButton = screen.queryByText('submit') expect(submitButton).not.toBeInTheDocument() diff --git a/docs/preact-testing-library/example.mdx b/docs/preact-testing-library/example.mdx index 7faf234d..609f26ac 100644 --- a/docs/preact-testing-library/example.mdx +++ b/docs/preact-testing-library/example.mdx @@ -32,7 +32,7 @@ function HiddenMessage({children}) { ```jsx // NOTE: jest-dom adds handy assertions to Jest and it is recommended, but not required. -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' import {h} from 'preact' import {render, fireEvent} from '@testing-library/preact' diff --git a/docs/react-testing-library/api.mdx b/docs/react-testing-library/api.mdx index 2e01c9b1..2180e5df 100644 --- a/docs/react-testing-library/api.mdx +++ b/docs/react-testing-library/api.mdx @@ -47,7 +47,7 @@ render(
) ```jsx import {render} from '@testing-library/react' -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' test('renders a message', () => { const {container, getByText} = render() diff --git a/docs/react-testing-library/example-intro.mdx b/docs/react-testing-library/example-intro.mdx index e996c4ad..9aa7edf5 100644 --- a/docs/react-testing-library/example-intro.mdx +++ b/docs/react-testing-library/example-intro.mdx @@ -14,7 +14,7 @@ import React from 'react' import {rest} from 'msw' import {setupServer} from 'msw/node' import {render, fireEvent, waitFor, screen} from '@testing-library/react' -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' import Fetch from '../fetch' const server = setupServer( @@ -78,7 +78,7 @@ import {setupServer} from 'msw/node' import {render, fireEvent, waitFor, screen} from '@testing-library/react' // add custom jest matchers from jest-dom -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' // the component to test import Fetch from '../fetch' ``` diff --git a/docs/svelte-testing-library/api.mdx b/docs/svelte-testing-library/api.mdx index dd59b3e9..481a7797 100644 --- a/docs/svelte-testing-library/api.mdx +++ b/docs/svelte-testing-library/api.mdx @@ -122,7 +122,7 @@ changes. **Test** ```js -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' import {render, fireEvent} from '@testing-library/svelte' diff --git a/docs/svelte-testing-library/example.mdx b/docs/svelte-testing-library/example.mdx index bb2c6f3f..38a031d6 100644 --- a/docs/svelte-testing-library/example.mdx +++ b/docs/svelte-testing-library/example.mdx @@ -26,7 +26,7 @@ sidebar_label: Example ```js // NOTE: jest-dom adds handy assertions to Jest and it is recommended, but not required. -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom' import {render, fireEvent} from '@testing-library/svelte'