Add docs for Web Testing Library#1204
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
| Utilities are included in this project based on the following guiding | ||
| principles: | ||
|
|
||
| 1. They should be usable on both the Web Platform **and** React Native |
There was a problem hiding this comment.
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.
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.
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.
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.
Any reason not to just put waitFor in its own package?
Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
| Several utilities are provided for dealing with asynchronous code. These can be | ||
| useful to wait for an element to appear or disappear in response to an event, | ||
| user action, timeout, or Promise. (See the | ||
| [guide to testing disappearance](guide-disappearance.mdx).) |
There was a problem hiding this comment.
This works, it redirects to https://deploy-preview-1204--testing-library.netlify.app/docs/guide-disappearance
|
Switching to "Web-interoperable Testing Library" and |
|
@eps1lon should we also rename the |
Docs for the initial release of Web Testing Library.
waitForAPI 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