Skip to content
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

Add eslint-plugin-jest plugin's valid-expect rule to detect future .toBeTruthy issues #12893

Closed
pdehaan opened this issue May 16, 2022 · 3 comments

Comments

@pdehaan
Copy link
Contributor

pdehaan commented May 16, 2022

Description

Second part of #12868 (where we add the ESLint plugin to catch future incidents/typos)

Steps to reproduce

Not sure if we add it to each package that uses Jest, or if we try shimming it into the eslint-plugin-fxa package.

Expected result

Fix future uncalled .toBeInTheDocument and .toBeTruthy references in tests (where they should be .toBeTruthy()).

Actual result

See #12892 PR which fixes the current issues, but this ticket/task should ideally make sure we don't make similar typos in the future.

┆Issue is synchronized with this Jira Task

@pdehaan
Copy link
Contributor Author

pdehaan commented May 31, 2022

Quick little git grep command to detect which packages are likely using Jest.

git grep -nE '"jest": "([[:digit:]]+\.?){3}"' packages/*/package.json | cat

packages/fxa-admin-panel/package.json:101:    "jest": "27.5.1",
packages/fxa-admin-server/package.json:88:    "jest": "27.5.1",
packages/fxa-event-broker/package.json:99:    "jest": "27.5.1",
packages/fxa-graphql-api/package.json:97:    "jest": "27.5.1",
packages/fxa-payments-server/package.json:101:    "jest": "27.5.1",
packages/fxa-react/package.json:72:    "jest": "27.5.1",
packages/fxa-shared/package.json:65:    "jest": "27.5.1",
packages/fxa-support-panel/package.json:73:    "jest": "27.5.1",

@pdehaan
Copy link
Contributor Author

pdehaan commented May 31, 2022

Ref: #12978

@cknowles-admin
Copy link

FxA is no longer synchronizing all issues between Jira and Github. We are closing open issues and will selectively synchronize in the future.

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

No branches or pull requests

3 participants