-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Description
Thank you for you hard work on svelte-testing-library! I can't wait to test my components with this!
What are your thoughts about changing the second argument of render to options instead of props? This would allow the user of this great library to tailor all the other component options that are available to their liking, most notably hydrate.
- export const render = (Component, props) => {
+ export const render = (Component, options) => {
const container = document.body.appendChild(document.createElement('div'))
const rendered = new Component({
+ ...options,
target: container,
- props,
})
// ...
}const { getByText } = render(App, {
props: { name: "world" },
hydrate: true
});Metadata
Metadata
Assignees
Labels
No labels