-
Notifications
You must be signed in to change notification settings - Fork 726
feat(qwik-testing-library): add documentation for Qwik Testing Library #1432
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
Conversation
…g Library framework
✅ Deploy Preview for testing-library ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really up-to-date with this PR.
Did you verify bringing the documentation over to testing-library.com with someone @ianlet ?
I'm asking because the other libraries are all part of the @testing-library org (with SolidJS as an exception).
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 cc @MatanBobi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this Ian.
I've left a few comments :)
Also, regarding the library itself, I recommend adding qwik (with the supported version) and DTL as peer dependencies.
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. |
Definitely not a blocker :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think everything is covered 👍
@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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me, thanks Ian :) I'll leave it open for a couple of days to see if @timdeschryver wants to approve it too.
I will go over this tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
I just encountered a small typo, which I committed and resolved myself.
@all-contributors please add @ianlet for docs |
I've put up a pull request to add @ianlet! 🎉 |
Thank you @timdeschryver & @MatanBobi for your reviews and for merging! 🙌 |
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.