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
I saw some references to $$slots being private, but that may have only been true in the past because I see it in the docs, so it feels pretty safe to rely on: https://svelte.dev/docs#slots_object
I didn't write the recipe (I think @pngwn did, though I don't remember exactly) but I think changing the recipe to use the method that Luke suggested there makes sense.
In general I think the recipes need some tidying up and re-writing.
There's a recipe about testing: https://sveltesociety.dev/recipes/testing-and-debugging/unit-testing-svelte-component/
I found another another solution to testing slots here: bahmutov/cypress-svelte-unit-test#251 (comment). I then found one of the Svelte maintainers doing the same thing here: sveltejs/svelte#4296 (comment)
I saw some references to
$$slots
being private, but that may have only been true in the past because I see it in the docs, so it feels pretty safe to rely on: https://svelte.dev/docs#slots_objectIt looks like @kevmodrome originally added this recipe in https://github.com/svelte-society/sveltesociety.dev-legacy/commits/2103aaf7b9e670b7cfb64048664fd2d2d7ac1dd6/src/pages/recipes/testing-and-debugging/authenetication-with-svelte.svx. I haven't done much unit testing of Svelte components, so I'm curious what he thinks about this approach
The text was updated successfully, but these errors were encountered: