Skip to content

feat: introduce getQueriesForElement as alias for within. #457

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
mdjastrzebski opened this issue Jul 27, 2020 · 3 comments
Closed

feat: introduce getQueriesForElement as alias for within. #457

mdjastrzebski opened this issue Jul 27, 2020 · 3 comments

Comments

@mdjastrzebski
Copy link
Member

Describe the Feature

TL/RN v6 has provided getQueriesForElement for scoping queries to given element & it's children. RNTL v2 had a similar within function. Both of these were modeled on similar RTLs helper. In RTL both names are available (as alias) to provide the same function.

Possible Implementations

Provide getQueriesForElement as alias to within.

Benefits

  • compatibility with RTL
  • easier migration path for TL/RN v6 users.

Related Issues

Migration to v7, #456

@mdjastrzebski
Copy link
Member Author

CC: @thymikee, @cross19xx, @Esemesek

@thymikee
Copy link
Member

This is a simple rename and I've already created a migration doc for it: https://github.com/callstack/react-native-testing-library/pull/456/files#diff-e96d057ee0b5c209da93af10f6a373c1R51-R54

On the other hand, DOM testing library has this alias as well. Feel free to contribute this, but I'd prefer focusing more on the migration guide.

@thymikee
Copy link
Member

Closed via #461

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

No branches or pull requests

2 participants