Skip to content

Commit

Permalink
Add eslint-plugin-testing-library and eslint-plugin-jest-dom
Browse files Browse the repository at this point in the history
  • Loading branch information
moroshko committed May 10, 2020
1 parent 5d6c751 commit 455fec2
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:jest/recommended"
"plugin:jest/recommended",
"plugin:testing-library/recommended",
"plugin:testing-library/react",
"plugin:jest-dom/recommended"
],
"plugins": ["react-hooks", "jest"],
"plugins": ["react-hooks", "jest", "testing-library", "jest-dom"],
"rules": {
"no-unused-vars": [
"error",
Expand Down
24 changes: 24 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@
"cross-env": "7.0.2",
"eslint": "7.0.0",
"eslint-plugin-jest": "23.10.0",
"eslint-plugin-jest-dom": "^2.1.0",
"eslint-plugin-react": "7.19.0",
"eslint-plugin-react-hooks": "4.0.0",
"eslint-plugin-testing-library": "^3.1.2",
"husky": "4.2.5",
"jest": "26.0.1",
"mq-polyfill": "1.1.8",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Checkbox.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe("Checkbox", () => {
"id",
checkboxContainer.getAttribute("aria-labelledby")
);
expect(checkboxContainer).toHaveAttribute("aria-checked", "false");
expect(checkboxContainer).not.toBeChecked();

const checkboxInput = checkboxContainer.querySelector(
'input[type="checkbox"]'
Expand Down

1 comment on commit 455fec2

@vercel
Copy link

@vercel vercel bot commented on 455fec2 May 10, 2020

Choose a reason for hiding this comment

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

Please sign in to comment.