-
Notifications
You must be signed in to change notification settings - Fork 470
within for mutliple elements #420
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
Comments
🎉 I submitted issue #420 What a stony milestone! |
Similar to this #408 (comment) |
ah yeah i was actually initially going to post that here, but as I was talking with a colleague, it occurred to me it might be a bit cleaner to just use the existing testing-lib apis ala @kentcdodds any thoughts on this? |
Hi 👋 Hmm... I think that's ok. I don't know how many people would use that feature, but I don't see harm in adding it. Should be pretty simple as you said. Feel free to open a pull request for it. |
Now that we have |
I agree with @eps1lon here. This use case is well covered. |
@eps1lon and @kentcdodds are there examples you can point me towards where the name option is being used? I'm trying the following:
In this case, I've poured over the docs and while I do see where this concept is explained, I haven't found an example that shows it working. |
@Jiert are you on the latest version of the library? The |
@alexkrolick well don't I feel embarrassed. That was it, thanks so much! |
Describe the feature you'd like:
I'm aware of the callback function that allows you to accomplish this, but we've seen this pattern emerge enough times that it made me wonder if the ability to combine queries would be possible, and maybe make the tests a little more readable:
i.e. if i want to combine
getByText
&getByRole
i know I can do this:it would be nice to do something like this:
Suggested implementation:
modify within to accept a NodeList / array perhaps?
Describe alternatives you've considered:
none that i can think of
Teachability, Documentation, Adoption, Migration Strategy:
The text was updated successfully, but these errors were encountered: