Skip to content

Commit 74d63bf

Browse files
aleclarsonthymikee
authored andcommitted
docs: mention automatic cleanup
1 parent 20969cb commit 74d63bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

website/docs/API.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ const cleanup: () => void;
123123

124124
Unmounts React trees that were mounted with `render`.
125125

126+
> Please note that this is done automatically if the testing framework you're using supports the `afterEach` global (like mocha, Jest, and Jasmine). If not, you will need to do manual cleanups after each test.
127+
126128
For example, if you're using the `jest` testing framework, then you would need to use the `afterEach` hook like so:
127129

128130
```jsx

0 commit comments

Comments
 (0)