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'm not 100% sure if this issue lies with Svelte or Svelte Testing Library, but when attempting to test any component that calls getContext / setContext, the tests crash with an error.
Your vite.config.js file is not configured to load Svelte's browser code. You can see that the stacktrace is pointing to Svelte's server code, instead: svelte/src/internal/server/context.js.
See the Vitest setup docs for proper Vitest setup to ensure Svelte's browser version is used
I'm not 100% sure if this issue lies with Svelte or Svelte Testing Library, but when attempting to test any component that calls
getContext
/setContext
, the tests crash with an error.I've created a simple reproduction to demonstrate this:
Reproduction StackBlitz - just run
pnpm test
Reproduction Repo
The text was updated successfully, but these errors were encountered: