Replies: 5 comments 3 replies
-
There was an issue about this: So runes in Tooling releases that work may not be stable yet. |
Beta Was this translation helpful? Give feedback.
-
extensions is only for svelte sfc files. you don't have to configure anything for svelte.test.js to work, just use latest vite-plugin-svelte@4 |
Beta Was this translation helpful? Give feedback.
-
Really? Not working for me. I'll check the package versions once I get back to my work PC. Thanks for the input. |
Beta Was this translation helpful? Give feedback.
-
This is what I get when I rename Conversely, the tests run fine with the unaltered file name. As for packages, this is what I have outdated (svelte-wise): It seems that vite-plugin-svelte version 4 doesn't exist. I am behind one patch revision. That's all. What else could I be doing wrong, if the file name should work? |
Beta Was this translation helpful? Give feedback.
-
Ok, by upgrading to @sveltejs/vite-plugin-svelte v4.0.0-next.6, the error is now different: This happens regardless of the file name. |
Beta Was this translation helpful? Give feedback.
-
This is just a very minor thing: In VS Code, you the icon of a file changes when its filename ends with ".test.ts", versus the icon used for ".ts" files. I like it as I can identify test files visually with this icon change.
However, if I need runes in test files, it must be named with ".test.svelte.ts", because it must end with ".svelte.ts" or runes are a No No. This makes VS Code not to use the test icon. So I said "No problem, I'll just specify the extensions in svelte.config.js". Well, couldn't make it work.
I did:
With this, no testing works. For some reason a compiler error on @testing-library/svelte happens. It is super unhelpful: Unexpected token on the line where the mount function is defining the props object (to later be used in rerender()).
Any guidance on how to define the extensions properly? Am I doing this wrong?
Beta Was this translation helpful? Give feedback.
All reactions