Skip to content

Commit

Permalink
update the description of rerender
Browse files Browse the repository at this point in the history
  • Loading branch information
yanick committed Feb 3, 2024
1 parent 6ae3bb1 commit 3290122
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/svelte-testing-library/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const view = render(YourComponent, {myProp: 'value'})
| `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**. |
| `debug` | Logs the `container` using [prettyDom](dom-testing-library/api-debugging.mdx/#prettydom). |
| `unmount` | Unmounts the component from the `target` by calling `component.$destroy()`. |
| `rerender` | Calls render again destroying the old component, and mounting the new component on the original `target` with any new options passed in. |
| `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. |
| `...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. |

## `cleanup`
Expand Down

0 comments on commit 3290122

Please sign in to comment.