You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`container`| The HTML element the component is mounted into. |
56
-
|`component`| The newly created Svelte component. This is mostly useful for testing exported functions or cases where manipulating the DOM doesn't fit. Outside of said cases avoid using the component directly to build tests, instead of interacting with the rendered Svelte component, work with the DOM. |
57
-
|`debug`| Logs the `container` using [prettyDom](https://testing-library.com/docs/dom-testing-library/api-helpers#prettydom). |
58
-
|`unmount`| Unmounts the component from the `target` by calling `component.$destroy()`. |
59
-
|`rerender`| Calls render again destroying the old component, and mounting the new component on the original `target` with any new options passed in. |
60
-
|`...queries`| Returns all [query functions](https://testing-library.com/docs/dom-testing-library/api-queries) that are binded to the `container`. If you pass in `query` arguments than this will be those, otherwise all. |
|`container`| The HTML element the component is mounted into. |
56
+
|`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**. |
57
+
|`debug`| Logs the `container` using [prettyDom](https://testing-library.com/docs/dom-testing-library/api-helpers#prettydom). |
58
+
|`unmount`| Unmounts the component from the `target` by calling `component.$destroy()`. |
59
+
|`rerender`| Calls render again destroying the old component, and mounting the new component on the original `target` with any new options passed in. |
60
+
|`...queries`| Returns all [query functions](https://testing-library.com/docs/dom-testing-library/api-queries) that are binded to the `container`. If you pass in `query` arguments than this will be those, otherwise all. |
0 commit comments