diff --git a/docs/TutorialReact.md b/docs/TutorialReact.md index a66439e08eb8..511f4c544b53 100644 --- a/docs/TutorialReact.md +++ b/docs/TutorialReact.md @@ -256,7 +256,8 @@ import React from 'react'; import {cleanup, fireEvent, render} from '@testing-library/react'; import CheckboxWithLabel from '../CheckboxWithLabel'; -// automatically unmount and cleanup DOM after the test is finished. +// Note: running cleanup afterEach is done automatically for you in @testing-library/react@9.0.0 or higher +// unmount and cleanup DOM after the test is finished. afterEach(cleanup); it('CheckboxWithLabel changes the text after click', () => { diff --git a/examples/react-testing-library/__tests__/CheckboxWithLabel-test.js b/examples/react-testing-library/__tests__/CheckboxWithLabel-test.js index 8b3227003bb7..73aeeb99f4e6 100644 --- a/examples/react-testing-library/__tests__/CheckboxWithLabel-test.js +++ b/examples/react-testing-library/__tests__/CheckboxWithLabel-test.js @@ -4,7 +4,8 @@ import React from 'react'; import {cleanup, fireEvent, render} from '@testing-library/react'; import CheckboxWithLabel from '../CheckboxWithLabel'; -// automatically unmount and cleanup DOM after the test is finished. +// Note: running cleanup afterEach is done automatically for you in @testing-library/react@9.0.0 or higher +// unmount and cleanup DOM after the test is finished. afterEach(cleanup); it('CheckboxWithLabel changes the text after click', () => {