Skip to content

Conversation

lourenci
Copy link
Contributor

@lourenci lourenci commented Jun 5, 2020

It fixes #149.

Copy link
Member

@Belco90 Belco90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Leandro and thanks for your PR! The fix itself looks fine. Could you add couple of examples using container to valid and invalid sections within rule doc?

@lourenci lourenci requested a review from Belco90 June 7, 2020 00:04

const ruleTester = createRuleTester();

const ALL_QUERIES_COMBINATIONS_PLUS_CONTAINER = [...ALL_QUERIES_COMBINATIONS, 'container']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it would be better to keep ALL_QUERIES_COMBINATIONS and then use container for its specific scenarios. As this would test as valid scenarios that do not match real tests. For instance, in the line 12 it would translate to

screen.container()

which is not RTL valid code. Same below for

within(component).container()
@gndelia
Copy link
Collaborator

gndelia commented Jun 7, 2020

Thank you for the PR!

I added a couple of small comments 😄

Co-authored-by: Gonzalo D'Elia <gonzalo.n.delia@gmail.com>
@Belco90 Belco90 merged commit a783036 into testing-library:master Jun 10, 2020
@Belco90
Copy link
Member

Belco90 commented Jun 10, 2020

🎉 This PR is included in version 3.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Belco90
Copy link
Member

Belco90 commented Jun 10, 2020

@all-contributors please add @lourenci for bug, code and test

@allcontributors
Copy link
Contributor

@Belco90

I've put up a pull request to add @lourenci! 🎉

gndelia added a commit to gndelia/eslint-plugin-testing-library that referenced this pull request Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants