From d19e57f7cb86056f81b4af3a4a95565f57355672 Mon Sep 17 00:00:00 2001 From: Jubayeromi Date: Fri, 30 Oct 2026 15:46:31 +0600 Subject: [PATCH 1/6] Document testing cleanup --- src/content/warnings/react-dom-test-utils.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/content/warnings/react-dom-test-utils.md b/src/content/warnings/react-dom-test-utils.md index 794bb1d11f4..48032ee9d96 100644 --- a/src/content/warnings/react-dom-test-utils.md +++ b/src/content/warnings/react-dom-test-utils.md @@ -43,6 +43,16 @@ import {render} from '@testing-library/react'; render(); ``` +`render` returns an `unmount` function and the rendered container: + +```js +const {unmount, container} = render(); + +unmount(); +expect(container.innerHTML).toBe(''); +``` + + ### ReactDOMTestUtils.Simulate {/*reactdomtestutilssimulate*/} From 9293f4a871ef4a5c0b34aac805afa5441b4b4f16 Mon Sep 17 00:00:00 2001 From: Jubayeromi Date: Fri, 30 Oct 2026 15:47:28 +0600 Subject: [PATCH 2/6] Document testing cleanup --- src/content/warnings/react-dom-test-utils.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/warnings/react-dom-test-utils.md b/src/content/warnings/react-dom-test-utils.md index 48032ee9d96..515bae6f89d 100644 --- a/src/content/warnings/react-dom-test-utils.md +++ b/src/content/warnings/react-dom-test-utils.md @@ -52,7 +52,7 @@ unmount(); expect(container.innerHTML).toBe(''); ``` - +React Testing Library automatically cleans up rendered trees after each test when your test framework provides an `afterEach` hook. You can call `unmount` yourself when you need to verify cleanup during a test. Unmounting a tree also removes content rendered into a portal by that tree. If your test creates a separate React root, unmount that root separately. ### ReactDOMTestUtils.Simulate {/*reactdomtestutilssimulate*/} From c0d82b985df14119b08a9b5d6c3235d4aeae3a1d Mon Sep 17 00:00:00 2001 From: Jubayeromi Date: Fri, 30 Oct 2026 15:49:53 +0600 Subject: [PATCH 3/6] Document testing cleanup --- src/content/warnings/react-dom-test-utils.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/content/warnings/react-dom-test-utils.md b/src/content/warnings/react-dom-test-utils.md index 515bae6f89d..57a55399523 100644 --- a/src/content/warnings/react-dom-test-utils.md +++ b/src/content/warnings/react-dom-test-utils.md @@ -43,6 +43,7 @@ import {render} from '@testing-library/react'; render(); ``` + `render` returns an `unmount` function and the rendered container: ```js @@ -54,6 +55,7 @@ expect(container.innerHTML).toBe(''); React Testing Library automatically cleans up rendered trees after each test when your test framework provides an `afterEach` hook. You can call `unmount` yourself when you need to verify cleanup during a test. Unmounting a tree also removes content rendered into a portal by that tree. If your test creates a separate React root, unmount that root separately. +`` ### ReactDOMTestUtils.Simulate {/*reactdomtestutilssimulate*/} `Simulate` can be replaced with `fireEvent` from `@testing-library/react`. From a7748bced530f56c89c1d1d10c2ad61bacf4cfcb Mon Sep 17 00:00:00 2001 From: Jubayeromi Date: Sat, 31 Oct 2026 12:56:53 +0600 Subject: [PATCH 4/6] Fix malformed code fence in test utils warning Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/content/warnings/react-dom-test-utils.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/warnings/react-dom-test-utils.md b/src/content/warnings/react-dom-test-utils.md index 57a55399523..63a1576f892 100644 --- a/src/content/warnings/react-dom-test-utils.md +++ b/src/content/warnings/react-dom-test-utils.md @@ -55,7 +55,7 @@ expect(container.innerHTML).toBe(''); React Testing Library automatically cleans up rendered trees after each test when your test framework provides an `afterEach` hook. You can call `unmount` yourself when you need to verify cleanup during a test. Unmounting a tree also removes content rendered into a portal by that tree. If your test creates a separate React root, unmount that root separately. -`` +``` ### ReactDOMTestUtils.Simulate {/*reactdomtestutilssimulate*/} `Simulate` can be replaced with `fireEvent` from `@testing-library/react`. From 1f1154153627f467848554c68dab65dc4f0c1779 Mon Sep 17 00:00:00 2001 From: Jubayeromi Date: Sat, 31 Oct 2026 13:03:00 +0600 Subject: [PATCH 5/6] fix some lining issue --- src/content/warnings/react-dom-test-utils.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/warnings/react-dom-test-utils.md b/src/content/warnings/react-dom-test-utils.md index 63a1576f892..0c5b5d4fc8d 100644 --- a/src/content/warnings/react-dom-test-utils.md +++ b/src/content/warnings/react-dom-test-utils.md @@ -56,7 +56,7 @@ expect(container.innerHTML).toBe(''); React Testing Library automatically cleans up rendered trees after each test when your test framework provides an `afterEach` hook. You can call `unmount` yourself when you need to verify cleanup during a test. Unmounting a tree also removes content rendered into a portal by that tree. If your test creates a separate React root, unmount that root separately. ``` -### ReactDOMTestUtils.Simulate {/*reactdomtestutilssimulate*/} + ### ReactDOMTestUtils.Simulate {/*reactdomtestutilssimulate*/} `Simulate` can be replaced with `fireEvent` from `@testing-library/react`. From c0872ba11999aeca85d4ee44b572c0044fcadee4 Mon Sep 17 00:00:00 2001 From: Jubayeromi Date: Sat, 31 Oct 2026 13:16:57 +0600 Subject: [PATCH 6/6] Fix Quick Start heading order --- src/components/MDX/SimpleCallout.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/MDX/SimpleCallout.tsx b/src/components/MDX/SimpleCallout.tsx index 0e124baa743..2560aed2376 100644 --- a/src/components/MDX/SimpleCallout.tsx +++ b/src/components/MDX/SimpleCallout.tsx @@ -11,7 +11,7 @@ import * as React from 'react'; import cn from 'classnames'; -import {H3} from './Heading'; +import {H2} from './Heading'; interface SimpleCalloutProps { title: string; @@ -25,11 +25,11 @@ function SimpleCallout({title, children, className}: SimpleCalloutProps) { 'p-6 xl:p-8 pb-4 xl:pb-6 bg-card dark:bg-card-dark rounded-2xl shadow-inner-border dark:shadow-inner-border-dark text-base text-secondary dark:text-secondary-dark my-8', className )}> -

{title} -

+ {children} );