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 facing a similar issue with Svelte v5 in testing context to the one someone reported on SO today. The unit test works fine until I add a <style></style> to the component.
As soon as a component contains a style, the following error starts appearing when running npm run test:
FAIL src/tests/lib/components/Back.spec.ts [ src/tests/lib/components/Back.spec.ts ]
TypeError: Error while preprocessing src/lib/components/Back.svelte - Cannot create proxy with a non-object as target or handler
❯ new PartialEnvironment node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:16766:19
❯ preprocessCSS node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:48447:23
❯ node_modules/@sveltejs/vite-plugin-svelte/src/preprocess.js:114:10
❯ style node_modules/@sveltejs/vite-plugin-svelte/src/preprocess.js:77:37
❯ process_single_tag node_modules/svelte/src/compiler/preprocess/index.js:283:21
❯ replace_in_code node_modules/svelte/src/compiler/preprocess/replace_in_code.js:70:23
❯ process_tag node_modules/svelte/src/compiler/preprocess/index.js:300:26
❯ Module.preprocess node_modules/svelte/src/compiler/preprocess/index.js:363:25
❯ compileSvelte node_modules/@sveltejs/vite-plugin-svelte/src/utils/compile.js:85:20
I'm facing an issue in our design kit, which I started using for migrating our existing app to Svelte v5 (PR).
Note that I originally reported the issue to Svelte Testing (here), but since I can reproduce the issue with a Svelte mount, we can rule out that library as the root cause.
Reproduction
git clone https://github.com/peterpeterparker/svelte-vite-testing-library-css
cd svelte-vite-testing-library-css
npm ci
npm run test
Describe the bug
I'm facing a similar issue with Svelte v5 in testing context to the one someone reported on SO today. The unit test works fine until I add a
<style></style>
to the component.As soon as a component contains a style, the following error starts appearing when running
npm run test
:I'm facing an issue in our design kit, which I started using for migrating our existing app to Svelte v5 (PR).
Note that I originally reported the issue to Svelte Testing (here), but since I can reproduce the issue with a Svelte
mount
, we can rule out that library as the root cause.Reproduction
Logs
No response
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: