How to handle Svelte Context inside test #579
Unanswered
LeakStephane
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I'm currently refactoring a svelte codebase going from
@testing-library/sveltetovitest-browser-svelteThis repository and documentation, has helped me a lot so far (👍 Component testing is super fast now). But i still wonder how to handle svelte
contextinside+page/+layoutThe code i need to refactor :
We are are defining context has a Map() and used to use the
renderfunction from '@testing-library/svelte'Some usage
Could you provide an exemple of doing testing with
svelte:contextinside the documentation ?Do you have some pattern, or best pratices to shares for that use case ?
@spences10
All reactions