-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Can someone help with Unknown file extension ".svelte" error for component test? #16787
Comments
it seems to you need use compiler to transform the svelte to js, you can try this in you playwright.config.ts.
|
I will try that later as I'm at work right now, but thanks for the help :) |
Do you guys think I need to install svelte on the root directory of the project? As I'm using npm workspaces, the sveltekit is only present at the frontend directory, so I couldn't find the correct way to import Also, my playwright-ct.config is a Javascript file, not Typescript |
I tried the suggestions but using the vite.config.js and svelte.config.js and got the same result, but I might have done it wrong https://github.com/ltsuda/learning-tests/commit/4162751042451b6b3af19c576d8bb2f4088203df |
you can try to use |
I believe SvelteKit no longer uses |
@sand4rt fyi in case you are interested in it. I recently removed our tests for SvelteKit because it changed again and broke us :) |
Understood, I didn't remember Sveltekit being still in beta. I'm sorry about that. I will hold my studies about component test on my repo for now and focus on another area, like the contract tests. Thanks for the information and for the time guys <3 |
Oops! Thanks for letting me know. Not sure why they failed because they passed locally on my machine. I'll have a look at that when in find some time. |
@ltsuda SvelteKit has reached release candidate status! See the announcement: https://www.youtube.com/watch?v=A8jkJTWacow&t=29628s. They say they have no more planned breaking changes.
@pavelfeldman I can't reproduce it, should i still take a look at this? |
Thanks for the message, I have try again sometime. Whenever you guys want to close this, it's fine for me. If I have any other problem again, I can open a new issue. |
SvelteKit is stable now 🤩 Would love component testing support |
Hi, SvelteKit maintainer here
We do use
I wouldn't do that, but just use the user's |
Why was this issue closed?Thank you for your involvement. This issue was closed due to limited engagement (upvotes/activity), lack of recent activity, and insufficient actionability. To maintain a manageable database, we prioritize issues based on these factors. If you disagree with this closure, please open a new issue and reference this one. More support or clarity on its necessity may prompt a review. Your understanding and cooperation are appreciated. |
Context:
Hi guys, can someone help with the issue below? I'm not used to Javascript/Node or anything related to frontend.
I have this project (for study) with KoaJS for the backend, SvelteKit for the frontend and Playwright to do all API/E2E/Component tests.
I tried to setup the Component Test for the Button.svelte component but here is the error is occurring. Thanks in advance.
The text was updated successfully, but these errors were encountered: