Ross MacPhee
Ross MacPhee
Yeah, from what I can gather, `import.meta.env` is populated purely on a contextual basis. Therefore, outside of Vite environments, those properties that svelte _expects_ to exist, do not. The problem...
> Yeah, I think there's a couple ways to do test setup: > > * @patrickleet's [`TestHarness.svelte`](https://github.com/CloudNativeEntrepreneur/sveltekit-eventsourced-funnel/blob/master/__tests__/unit/helpers/TestHarness.svelte) along with `babel-plugin-transform-vite-meta-env` > * Or Jest's brand new, experimental, and undocumented `unstable_mockModule`...
A notion of a sveltekit testing adapter could be an interesting prospect, i.e.: a jest or jasmine adapter that is capable of transforming svelte projects into a format that jest...