skeleton
skeleton copied to clipboard
NEXT: Automated Testing
As part of Skeleton v3, we'll implement support for multiple frontend frameworks. We'll likely want to consolidate on a common and universal testing tool. For this we'll opt for Vitest.
Tasks
- [x] Install and configure Vitest: https://vitest.dev/
- [x] Install and configure Testing Library: https://testing-library.com/docs/
- [x] Use the Accordion component as our initial reference
- [ ] Update the Contributor guide to provide our requirements for testing
- [x] Update existing components that pre-date testing implementation
- [ ] ONGOING: verify new features implement test cases
Goal
See: https://github.com/skeletonlabs/skeleton/issues/150
We need to ensure we have an adequate depth and quality of test cases per component. This will make it easier to introduce new features, handle refactors, and of course improve general QA testing. With the ultimate goal of ensuring we have a set of simple and robust test cases that are not too rigid.
Some component design and features are still in flux, so aim to ensure that tests may need to be improved over time.
References:
Feedback
If you have additional updates or requests for this feature, please do so in the comments section below.
I'd think Testing Library will be beneficial for cross framework component testing because the sheer amount of frameworks they support. This will allow for a familliar testing API no matter what framework is being tested on.
From the last time I used it, it is compatible with vitest
meaning we don't need 2 test runners. It would simply provide a virtual dom to mount and test components in.
Yeah that's been my thought as well. We actually use Testing Library already for Skeleton v2.
(Though I really hate the name - it's so generic you can't google for anything you need! Grr! :D)