Skip to content

fix: prevent direct checks against attributes #16

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

Merged
merged 4 commits into from
Nov 18, 2019

Conversation

benmonro
Copy link
Member

this PR prevents direct checks against attributes.

examples:

expect(element.checked).toBeTruthy()
expect(getByText('foo').checked).toBeFalsy()
expect(getByText('foo').checked).toBe(true)

expect(getByText('foo').checked).toBe(false)

expect(getByText('foo').checked).toBe(null)

expect(getByText('foox').checked).toEqual(undefined)
expect(element.checked).toBe(true)

@benmonro benmonro merged commit 87566a2 into master Nov 18, 2019
@benmonro benmonro deleted the feature/checked-direct branch November 18, 2019 15:59
@benmonro
Copy link
Member Author

🎉 This PR is included in version 1.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

1 participant