Skip to content

Commit 3290122

Browse files
committed
update the description of rerender
To be in line with testing-library/svelte-testing-library#210
1 parent 6ae3bb1 commit 3290122

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/svelte-testing-library/api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const view = render(YourComponent, {myProp: 'value'})
6565
| `component` | The newly created Svelte component. Generally, this should only be used when testing exported functions, or when you're testing developer facing API's. Outside of said cases avoid using the component directly to build tests, instead of interacting with the rendered Svelte component, work with the DOM. Have a read of [Avoid the Test User](https://kentcdodds.com/blog/avoid-the-test-user) by Kent C. Dodds to understand the difference between the **end user** and **developer user**. |
6666
| `debug` | Logs the `container` using [prettyDom](dom-testing-library/api-debugging.mdx/#prettydom). |
6767
| `unmount` | Unmounts the component from the `target` by calling `component.$destroy()`. |
68-
| `rerender` | Calls render again destroying the old component, and mounting the new component on the original `target` with any new options passed in. |
68+
| `rerender` | Calls [$set](https://svelte.dev/docs/client-side-component-api#$set) on the component. `rerender` takes in an option object just like `render`, but only the `props` key will be used. |
6969
| `...queries` | Returns all [query functions](queries/about.mdx) that are bound to the `container`. If you pass in `query` arguments than this will be those, otherwise all. |
7070

7171
## `cleanup`

0 commit comments

Comments
 (0)