Skip to content

Commit e1516d1

Browse files
committed
Svelte cleanup docs match React language
1 parent 32505be commit e1516d1

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

docs/react-testing-library/api.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,8 @@ expect(firstRender).toMatchDiffSnapshot(asFragment())
289289
290290
Unmounts React trees that were mounted with [render](#render).
291291
292-
> Please note that this is done automatically if the testing framework you're
293-
> using supports the `afterEach` global and it is injected to your testing
294-
> environment (like mocha, Jest, and Jasmine). If not, you will need to do
295-
> manual cleanups after each test.
292+
> This is called automatically if your testing framework (such as mocha, Jest or
293+
> Jasmine) injects a global `afterEach()` function into the testing environment.
296294
297295
For example, if you're using the [ava](https://github.com/avajs/ava) testing
298296
framework, then you would need to use the `test.afterEach` hook like so:

docs/svelte-testing-library/api.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ const {results} = render(YourComponent, {myProp: 'value'})
7070

7171
## `cleanup`
7272

73-
> You don't need to import or use this, it's done automagically for you with
74-
> `globals: true` in your test config!
73+
> This is called automatically if your testing framework (such as mocha, Jest or
74+
> Jasmine) injects a global `afterEach()` function into the testing environment.
7575
7676
Unmounts the component from the container and destroys the container.
7777

0 commit comments

Comments
 (0)