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

fix!: testing + linting technical debt #945

Merged
merged 9 commits into from
Mar 1, 2023

Conversation

jamesdh
Copy link
Contributor

@jamesdh jamesdh commented Feb 28, 2023

Basically just trying to get the validation environment in a healthy state. Lots of warnings lingering around as a result of half-completed updates, some misuse of types (or lack thereof), a number of dependencies that were badly in need of updating, and some of the necessary pain that comes as a result of finally updating them.

  • Updates + pins a number of the key testing dependencies in use
  • Extracts the Jest config from the package.json to its own jest.config.ts file. This is Jest's recommended approach, and with the Jest types makes configuration easier.
  • Adds jest-fail-on-console. An earlier React 18 update caused the tests to output a pile of console warnings. Essentially, the work to truly upgrade to React 18 was incomplete. However, since the tests all still passed, everything appeared "green" when reviewing the PR in GitHub. This will change that going forward.
  • Fixed usages of ReactDOMTestUtils.act. I'm not sure how some of those tests were passing to begin with, but the aforementioned dependency updates caused many of them to break. In the cases where we were attempting to validate expectations within the act() helper, I moved them outside of it and removed the needless await waitFor.
  • Updates + pins some of the eslint + jest related dependencies since there were some bizarre linting errors after adding the jest.*.ts files to the tsconfig.
  • Fixes some additional eslint warnings for misused any types.
  • Fixes an eslint react version warning resulting from some lacking config

BEGIN_COMMIT_OVERRIDE
refactor!: add types (#945)

BREAKING-CHANGE: signIn and signOutRedirect now has it's own types.

feat: update + pin a key dependencies in use (#945)
fix: validation environment (#945)
END_COMMIT_OVERRIDE

@update-docs
Copy link

update-docs bot commented Feb 28, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update some of our documentation based on your changes. You can run yarn generate-docs to generate some!

@codecov
Copy link

codecov bot commented Feb 28, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@e9f8d8a). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 13a962f differs from pull request most recent head 0d68906. Consider uploading reports for the commit 0d68906 to get more accurate results

@@           Coverage Diff            @@
##             main      #945   +/-   ##
========================================
  Coverage        ?   100.00%           
========================================
  Files           ?         1           
  Lines           ?        84           
  Branches        ?        33           
========================================
  Hits            ?        84           
  Misses          ?         0           
  Partials        ?         0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jamesdh
Copy link
Contributor Author

jamesdh commented Mar 1, 2023

Also I think it's safe to remove the update-docs bot at this point, since the docs job has been fixed.

Copy link
Member

@simenandre simenandre left a comment

Choose a reason for hiding this comment

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

Thank you so much for this! 🚀

src/AuthContext.tsx Show resolved Hide resolved
src/AuthContext.tsx Show resolved Hide resolved
src/AuthContextInterface.ts Show resolved Hide resolved
@jamesdh jamesdh changed the title Testing updates + fixes + improvements fix!: testing updates + fixes + improvements Mar 1, 2023
@jamesdh jamesdh changed the title fix!: testing updates + fixes + improvements fix!: testing technical debt Mar 1, 2023
@jamesdh jamesdh changed the title fix!: testing technical debt fix!: testing + linting technical debt Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ReactDOM.render is no longer supported in React 18. Use createRoot instead.
2 participants