Closed
Description
Describe the problem
I've had the need to create snippets (specifically for the children prop) both in unit tests as well as in Storybook. My current workaround has been to create a new component which passes what I need as children to the component I want to test. But that creates indirection since I need to place that in a separate file.
Describe the proposed solution
It would be great to have some built-in API to define a snippet function without having to have a .svelte file. This would simplify testing components with @testing-library/svelte as well as passing args as snippet props in Storybook.
Alternatives considered
As mentioned I've been defining new components in new files that pass the snippets I want, but I don't think that's a good long-term solution.
Importance
nice to have
Metadata
Metadata
Assignees
Labels
No labels