Skip to content

Make default selectors more like cypress/jQuery #33

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

Closed
alexkrolick opened this issue Feb 4, 2019 · 2 comments
Closed

Make default selectors more like cypress/jQuery #33

alexkrolick opened this issue Feb 4, 2019 · 2 comments

Comments

@alexkrolick
Copy link
Contributor

alexkrolick commented Feb 4, 2019

testing-library/dom-testing-library#202 (comment)

@helixbass
Copy link

-1 if the suggestion is to make .getBy*() not throw errors on missing elements

Keeping semantic compatibility with react-testing-library would seem like a high priority (for developers using both), and I know I'm writing tests that "implicitly assert" by just calling eg .getByText()

And why wouldn't it be ok to just use .queryBy*() for potentially missing elements (like react-testing-library)?

@alexkrolick
Copy link
Contributor Author

alexkrolick commented Feb 5, 2019

Cypress already implicitly asserts get and contains.

For background on why compatibility is desirable see #13, #31, #30, #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants