[Question] Can someone help with Unknown file extension ".svelte" error for component test?
See original GitHub issueContext:
- Playwright Version: 1.25.1
- Operating System: Ubuntu 22.04.1 (WSL2 - Windows 11)
- Node.js version: 16.17.0
- Browser: All
- Extra: SvelteKit
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.
> git clone https://github.com/ltsuda/learning-tests.git
> git switch test/initial-component
> npm i
> npx playwright install
> npm run test-ct
> learning-tests@1.0.0 test-ct
> playwright test -c playwright-ct.config.js
Running 0 tests using 0 workers
TypeError: Unknown file extension ".svelte" for /home/ltsuda/developer/learning-tests/frontend/src/components/button/Button.svelte
at async Promise.all (index 1)
=================
no tests found.
=================
1 error was not a part of any test, see above for details
To open last HTML report run:
npx playwright show-report
Issue Analytics
- State:
- Created a year ago
- Comments:12 (10 by maintainers)
Top Results From Across the Web
TypeError: Unknown file extension ".svelte" : r/sveltejs - Reddit
In my svelte project, I am using TypeScript, vite and vitest When I included a 3rd party svelte module layercake , my unit...
Read more >using multiple imports in content script, only one causes ...
I 'm working on a chrome browser extension. The error only appears in the content script. I have slightly modified this typescript file:...
Read more >Componentizing our Svelte app - Learn web development
But how do you know what should be split into its own component? There are no hard rules for this. Some people prefer...
Read more >Full Stack SvelteKit For Beginners - Joy of Code
A basic understanding of JavaScript and Svelte helps - I made SvelteKit For ... for the error.svelte and layout.svelte components you're going to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
you can try to use
npm init playwright@latest -- --ct
to generate the config. see hereand you can add vite config here instead of vite.config.js
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. Thanks again for the help 😃