Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4ec21b7
feat: added prefer enabled disabled
Oct 23, 2019
fd86cdb
fix: unit test and updated docs
Oct 23, 2019
f089edc
feat: added toHaveAttribute
Oct 24, 2019
717040f
feat: support for not
Oct 24, 2019
68e0daf
feat: don't use not on toBeDisabled/Enabled
Oct 24, 2019
59992f9
fix: little refactoring
Oct 24, 2019
e02f9f2
chore: addressed PR feedback
Oct 24, 2019
fcd267a
fix: added url
Oct 24, 2019
3488c5d
docs: added to home page
Oct 24, 2019
c8bdc40
docs: changed prefer enabled disabled to recommended
Oct 24, 2019
4db94eb
docs: added to recommended
Oct 24, 2019
db6cef3
docs: fixed typo in readme
Oct 24, 2019
a9a2563
docs: more docs
Oct 24, 2019
aff8bc6
Merge branch 'master' into feature/prefer-enabled-disabled
benmonro Oct 24, 2019
86f4972
chore: removed comments
Oct 24, 2019
cd83ab4
Update docs/rules/jest-dom-prefer-enabled-disabled.md
benmonro Oct 25, 2019
5e6ca6c
Update docs/rules/jest-dom-prefer-enabled-disabled.md
benmonro Oct 25, 2019
9c72cd3
Update docs/rules/jest-dom-prefer-enabled-disabled.md
benmonro Oct 25, 2019
9ae4277
Update docs/rules/jest-dom-prefer-enabled-disabled.md
benmonro Oct 25, 2019
2a86e3a
Update docs/rules/jest-dom-prefer-enabled-disabled.md
benmonro Oct 25, 2019
4cceff7
Update docs/rules/jest-dom-prefer-enabled-disabled.md
benmonro Oct 25, 2019
d0fc8e6
Update docs/rules/jest-dom-prefer-enabled-disabled.md
benmonro Oct 25, 2019
ca1fb14
chore: addressed PR feedback
Oct 25, 2019
139f88f
fix: added another valid test
Oct 25, 2019
ca796a8
feat: added rules for checked & required
Oct 27, 2019
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update docs/rules/jest-dom-prefer-enabled-disabled.md
Co-Authored-By: Thomas Lombart <t.lombart97@gmail.com>
  • Loading branch information
benmonro and thomaslombart authored Oct 25, 2019
commit cd83ab4bc781906a593f1aebb39c97d2e3cbb8ec
2 changes: 1 addition & 1 deletion docs/rules/jest-dom-prefer-enabled-disabled.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Rule Details

This rule aims to prevent false positives and improve readability and should only be used with the @testing-library/jest-dom package. See below for examples of those potential issues and why this rule is recommended. The rule is autofixable and will replace any instances of `.toHaveProperty()` or `.toHaveAttribute()` with `.toBeEnabled()` or `toBeDisabled()` as appropriate.
This rule aims to prevent false positives and improve readability and should only be used with the `@testing-library/jest-dom` package. See below for examples of those potential issues and why this rule is recommended. The rule is autofixable and will replace any instances of `.toHaveProperty()` or `.toHaveAttribute()` with `.toBeEnabled()` or `toBeDisabled()` as appropriate.

In addition, to avoid double negatives and confusing syntax, `expect(element).not.toBeDisabled()` is also reported and auto-fixed to `expect(element).toBeEnabled()` and visa versa.

Expand Down