-
Notifications
You must be signed in to change notification settings - Fork 80
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 test framework for unit tests #207
Comments
Yes, this is more than reasonable to do. Which test suite did you have in mind? In the past I’ve used |
I'm interested in switching the build system as well, and possibly using typescript so that there'd be better IDE integration, documentation of types, etc. I was thinking maybe vite? In which case vitest..? |
I want a build system that will make it easy to set up at least three different versions of the build,
|
I suspect it would be good to avoid testing parts that are not publicly observable, as otherwise it might create unnecessary work when improving the internals. But there are many things not tested in wpt, that possibly don't make sense to test in wpt but would make sense to test, e.g. that the css parsing correctly respects @media queries, nested selectors, etc, where in wpt it is assumed that the features work together because they're independent from one another in browser space. |
I haven't tested Vite in library mode, but it sounds tempting. Vitest works great, I've used it for testing some of the features before committing a PR. (I also tried Jest, but it doesn't work well with esm.)
I agree. I think testing the internal implementations through the public API would be best. |
Could we add a test framework for unit tests?
It would be useful to be able to build unit tests for some of the functionality. The web platform tests can take quite a while to run, and it would be useful to add unit tests where we implement internal procedures that are not tested directly in the WPT tests.
The text was updated successfully, but these errors were encountered: