Skip to content

Commit 5357791

Browse files
committed
chore: update index snapshots and README for new rules
1 parent 6482e37 commit 5357791

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ module.exports = [
130130
| [prefer-enabled-disabled](docs/rules/prefer-enabled-disabled.md) | prefer toBeDisabled or toBeEnabled over checking attributes || 🔧 | |
131131
| [prefer-focus](docs/rules/prefer-focus.md) | prefer toHaveFocus over checking document.activeElement || 🔧 | |
132132
| [prefer-in-document](docs/rules/prefer-in-document.md) | Prefer .toBeInTheDocument() for asserting the existence of a DOM node || 🔧 | 💡 |
133+
| [prefer-partially-checked](docs/rules/prefer-partially-checked.md) | prefer toBePartiallyChecked over checking aria-checked for mixed state || 🔧 | |
134+
| [prefer-partially-pressed](docs/rules/prefer-partially-pressed.md) | prefer toBePartiallyPressed over checking aria-pressed for mixed state || 🔧 | |
135+
| [prefer-pressed](docs/rules/prefer-pressed.md) | prefer toBePressed over checking attributes || 🔧 | |
133136
| [prefer-required](docs/rules/prefer-required.md) | prefer toBeRequired over checking properties || 🔧 | |
134137
| [prefer-to-have-attribute](docs/rules/prefer-to-have-attribute.md) | prefer toHaveAttribute over checking getAttribute/hasAttribute || 🔧 | |
135138
| [prefer-to-have-class](docs/rules/prefer-to-have-class.md) | prefer toHaveClass over checking element className || 🔧 | |

src/__tests__/index.test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ it("includes the configs and rules on the plugin", () => {
66
});
77

88
it("should have all the rules", () => {
9-
expect(Object.keys(rules)).toHaveLength(11);
9+
expect(Object.keys(rules)).toHaveLength(14);
1010
});
1111

1212
it.each(Object.entries(rules))(
@@ -31,6 +31,9 @@ it("has the expected recommended config", () => {
3131
jest-dom/prefer-enabled-disabled: error,
3232
jest-dom/prefer-focus: error,
3333
jest-dom/prefer-in-document: error,
34+
jest-dom/prefer-partially-checked: error,
35+
jest-dom/prefer-partially-pressed: error,
36+
jest-dom/prefer-pressed: error,
3437
jest-dom/prefer-required: error,
3538
jest-dom/prefer-to-have-attribute: error,
3639
jest-dom/prefer-to-have-class: error,
@@ -68,6 +71,9 @@ it("has the expected recommended flat config", () => {
6871
jest-dom/prefer-enabled-disabled: error,
6972
jest-dom/prefer-focus: error,
7073
jest-dom/prefer-in-document: error,
74+
jest-dom/prefer-partially-checked: error,
75+
jest-dom/prefer-partially-pressed: error,
76+
jest-dom/prefer-pressed: error,
7177
jest-dom/prefer-required: error,
7278
jest-dom/prefer-to-have-attribute: error,
7379
jest-dom/prefer-to-have-class: error,

0 commit comments

Comments
 (0)