-
Notifications
You must be signed in to change notification settings - Fork 728
Add docs for Web Testing Library #1204
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
✅ Deploy Preview for testing-library ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
3f89381
to
7b227e0
Compare
docs/web-testing-library/intro.mdx
Outdated
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.
The name "web testing library" is a bit confusing if it also works for React Native, which is definitely not the "web". Is the goal of this library to provide a library- and platform- agnostic API to replace some parts of the existing ecosystem?
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.
The goal is not to be platform agnostic (see e.g. ́setTimeout ́) but offer shared utilities that are used on the most common platforms
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 see. In that case I'd suggest naming it something that is less similar to the framework wrappers that implement a full element traversal API, and more similar to the util libraries like user-event.
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.
React Native is now official part of the web-interoperable runtimes: https://runtime-keys.proposal.wintercg.org/#react-native
Going to adjust the wording to use "web interoperable" instad of just "web" to make it less similar.
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.
Any reason not to just put waitFor
in its own package?
7b227e0
to
c25b253
Compare
Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
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.
Does this link work?
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 works, it redirects to https://deploy-preview-1204--testing-library.netlify.app/docs/guide-disappearance
Switching to "Web-interoperable Testing Library" and @testing-library/web-interoperable
. It's a bit unwieldy but I suspect that it's mostly used internally or re-exported from the actual testing libraries. The new name should ensure that people don't confuse it with a Testing Library for "the Web".
@eps1lon should we also rename the @testing-library/web
repo and package name to testing-library-web-interoperable
and @testing-library/web-interoperable
accordingly? Want me to do it?
Uh oh!
There was an error while loading. Please reload this page.
Docs for the initial release of Web Testing Library.
waitFor
API is implemented in testing-library/web-testing-library#2.The name is born out of pragmatism. A preciser name would be "Web-interoperable runtimes Testing Library" but life is too short to spell that out.
Preview