Replies: 3 comments 6 replies
-
Since you're pointing to |
Beta Was this translation helpful? Give feedback.
5 replies
-
Since Playwright was recently added to the template generator I subbed an issue for Vitest as well, which, if implemented, should help alleviate related Q&A items. #4143 |
Beta Was this translation helpful? Give feedback.
1 reply
-
The best way to use Vitest will be to use |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Hi! Im working on a unit test suite with Vitest where Im testing my
__layout.svelte
component and the$app
directory is imported.But when I run the tests I get the following error:
Investigating on the issue I got to the conclusion that the
.svelte-kit
directory is not available when running tests, because such directory is only available when running SvelteKit on development mode.In order to resolve such module in vitest, I have mapped the alias section for the vite configuration provided to both, sveltekit and vitest as follows:
Is there a way to generate the
.svelte-kit
directory for this purposes? Or is there any pattern on testing components which may include the$app
directory?Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions