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

chore(testbed): jest 29, flakiness fixes #610

Merged
merged 16 commits into from
Oct 5, 2022
Merged

chore(testbed): jest 29, flakiness fixes #610

merged 16 commits into from
Oct 5, 2022

Conversation

kanadgupta
Copy link
Member

@kanadgupta kanadgupta commented Sep 12, 2022

🧰 Changes

This PR bumps Jest and handles a bunch of testbed housekeeping. Not sure if tests are faster1, but the flakiness when running them locally should be gone.

  • Bumped jest, ts-jest, and @types/jest to v292 and updated snapshots accordingly (see their blog post) 🆙 📸
  • It was always bugging me that we had set our NODE_ENV value to testing for our testing environment as opposed to the widely used NODE_ENV value of test, so this makes that long overdue change. We were able to make a slight cleanup to our setup file as a result. 🧹
  • configstore has continued to give us grief when running tests locally and I had the idea of including the JEST_WORKER_ID in our configstore paths so Jest workers aren't clashing with each other. Now the test bed is editing a few of config files (7 on my local machine) instead of just one. That tiny change completely solved the flakiness on my local machine ✨

Sadly, our Jest coverage issues in CI (see #617) continue to persist 😭

🧬 QA & Testing

Do tests pass? And do they always pass?

Footnotes

  1. I mean... tests do feel faster? But maybe that's just a placebo ¯_(ツ)_/¯

  2. We were struggling to upgrade to Jest 29 for a few weeks now since our __tests__/tsconfig.json file wasn't being read properly. After noodling on this for a bit, I discovered that bumping us down to the legacy ts-jest preset fixed everything :cryparty: I don't love this solution but hopefully it's temporary.

@kanadgupta kanadgupta added the dependencies Pull requests that update a dependency file label Sep 12, 2022
@kanadgupta kanadgupta added bug Something isn't working refactor Issues about tackling technical debt labels Sep 29, 2022
@kanadgupta kanadgupta marked this pull request as ready for review September 29, 2022 23:14
@kanadgupta kanadgupta changed the title chore(deps-dev): jest 29 chore(testbed): jest 29, flakiness fixes Sep 29, 2022
@kanadgupta kanadgupta added this to the v8 milestone Sep 30, 2022
@kanadgupta kanadgupta requested a review from erunion October 3, 2022 17:27
Copy link
Member

@erunion erunion left a comment

Choose a reason for hiding this comment

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

glad you were able to finally sort this out

@kanadgupta kanadgupta merged commit 8d0af81 into main Oct 5, 2022
@kanadgupta kanadgupta deleted the jest-29 branch October 5, 2022 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file refactor Issues about tackling technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants