A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/testing-library/svelte-testing-library/issues/3 below:

Return the component from render · Issue #3 · testing-library/svelte-testing-library · GitHub

It might be beneficial to return rendered from the render function. It's a very pleasent testing experience to $set props (or use getters and setters when compiled with accessors: true) on the component in order to test that it is working properly.

What do you think?

export const render = (Component, options) => {
  // ...

  return {
+   component: rendered,
    ...getQueriesForElement(document.body),
  }
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4