-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add tests #7
Comments
|
There's been some recent discussion on twitter about which approach to take when testing large React apps (e2e vs unit, etc). That discussion led me to do more research and I came across the Prefer Integration Tests? Think twice article that dives deep into the topic. I suggest you to give it a read if you are unsure about what approach to take. Either way, Johnny Magrippis recently uploaded two videos about integrating SvelteKit with Vitest and with Playwright that could be useful for you. |
@buhodev Thanks, I'll check these links out |
I can begin working on a test-setup, i'll create a test branch! |
Great! Before you take up all the effort, can you elaborate a little bit on the plan? :) |
Looking for finding the minimal required setup to setup tests. I'm thinking a folder structure like this
We could define all the tests within this folder, and I'm thinking about using Playwright for svelte-stuff, and Vitest for everything else. Thoughts? |
OK! 👍 Though I'm currently not even sure sure how much we would need Playwright. As the utilities are designed to be as standalone as possible, maybe simply some unit tests per action, etc. with Vitest will suffice? |
The difficult thing i that there is no good way to run unit tests with Vitest. I tried with |
Ah I see. True, now that I think about it would indeed be much easier to test those things in application context. :) I'll get myself up to speed with it in the meantime; let me know how it goes! |
Definitely something that should be added as early as possible, will make the library a lot more appealing, and it's a lot easier beginning with it from the get-go instead of having it as a technical debt. Also makes it easier for other people to contribute/fix issues.
The text was updated successfully, but these errors were encountered: