-
Notifications
You must be signed in to change notification settings - Fork 25
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 #150
Comments
🙏 yes please, I am the worst for not adding in the first place. |
I spent a bit of time before the break on this and ran into some annoying issues where Jest had trouble loading ESM dependencies. @hugomrdias mentioned yesterday that he was interested in looking into alternatives to Jest, which I'd be excited about based on this experience and others, and spent a bit of time researching the state of the art during which I found this article: https://whistlr.info/2022/test-react-builtin/ TLDR is a) Node 18 comes with a builtin testing library Given all this I'm leaning slightly in the direction of trying to use |
here is a nice example of reusing the vite preview server for a browser based playwright test from vitest. for integration tests, i think re-using the vite preview server would be a win, and using playwright to handle browsers for us has been the least worst option we've hit so far.
|
We could use |
i'm exploring plain vanilla playwright integration testing for our examples in #238 |
Based on the discussion in #150, I decided to try replacing ava with vitest and found that it was super easy 😄 Much nicer out-of-the-box experience than getting ava to play nice with typescript. Any objections to tossing ava overboard? edit: once the build failure is sorted out, that is 😐
Now that #242 is merged can we consider this issue closed? |
yep I think so! |
UI testing! A very special hell that we should probably brave sooner than later.
We currently have a codesandbox integration configured that at least builds the example apps in CI.
We should add tests similar to the ones in the HeadlessUI component library, eg:
https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-react/src/components/combobox/combobox.test.tsx
Now that we have a bit of complexity in this library, some basic testing will probably make our lives easier down the road.
The text was updated successfully, but these errors were encountered: