testing-library-docs
testing-library-docs copied to clipboard
feat(qwik-testing-library): add documentation for Qwik Testing Library
This PR adds documentation for the new Qwik Testing Library to provide more testing tools for the Qwik Framework.
The library was tested with a few projects running in production, but any additional feedback is greatly appreciated as well!
We will keep updating the documentation with more examples and upcoming APIs (such as better mocking utilities and renderHook) when they become available.
Note: the easy way to setup the library with npm run qwik add testing-library is a PR in the Qwik framework and will soon be available. You need to follow the manual setup for now.
Deploy Preview for testing-library ready!
| Name | Link |
|---|---|
| Latest commit | 98b3fab7e78e0b42003e746d49157217be12ef4a |
| Latest deploy log | https://app.netlify.com/sites/testing-library/deploys/6722696089e2ba00088f9c66 |
| Deploy Preview | https://deploy-preview-1432--testing-library.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Thanks for the follow-up @timdeschryver! No, I did not verify bringing the documentation over to tesing-library.com before with someone as I was thinking this PR would open up the conversation. Sorry if I should have contacted someone before 😶
How do you usually proceed to bring in a new port of Testing Library to another framework?
Sorry for my late response @ianlet We've discussed this and are currently in the process of reviewing the library/docs
cc @MatanBobi
I'd also think about automatic cleanup but that might be tricky to support in both vitest and jest.
@MatanBobi Would you consider this as a blocker for this PR? In any case I think we can reuse the same approach as RTL where they check if globals are set and use that to autocleanup (+ an env var to opt out). It should work for both vitest and jest as they use the same global API.
@MatanBobi Would you consider this as a blocker for this PR? In any case I think we can reuse the same approach as RTL where they check if globals are set and use that to autocleanup (+ an env var to opt out). It should work for both vitest and jest as they use the same global API.
Definitely not a blocker :)
@MatanBobi @timdeschryver updated the PR with your comments
I also made a new release in the library itself to add support for auto cleanup and the ability to opt out with QTL_SKIP_AUTO_CLEANUP like the other libraries offer.
I will go over this tomorrow. Thanks for your patience @ianlet , and your thorough review @MatanBobi
@all-contributors please add @ianlet for docs
Thank you @timdeschryver & @MatanBobi for your reviews and for merging! :raised_hands: