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(deps): update jest monorepo and ts-jest to v27 (major) #571

Merged
merged 5 commits into from May 28, 2021

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 25, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@jest/types ^26.6.2 -> ^27.0.0 age adoption passing confidence
jest (source) ^26.2.2 -> ^27.0.0 age adoption passing confidence

Release Notes

facebook/jest

v27.0.1

Compare Source

Fixes
  • [jest-environment-jsdom] Bump version of JSDOM to avoid deprecated request package (#​11442)

Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot added the Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR label May 25, 2021
@ghost ghost added this to Inbox in JS May 25, 2021
@ghost ghost moved this from Inbox to Maintenance in JS May 25, 2021
@renovate renovate bot force-pushed the renovate/major-jest-monorepo branch from b6b8bf1 to b845249 Compare May 25, 2021 10:30
@renovate renovate bot changed the title chore(deps): update dependency jest to v27 chore(deps): update jest monorepo to v27 (major) May 25, 2021
Copy link
Member

@wolfy1339 wolfy1339 left a comment

Choose a reason for hiding this comment

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

Requires update to ts-jest

@gr2m
Copy link
Contributor

gr2m commented May 25, 2021

yeah bump to ts-jest@next, I'm doing that for all the other PRs right now. renovate will send us a PR once ts-jest 27 stable will be released

@gr2m
Copy link
Contributor

gr2m commented May 25, 2021

ts-jest 27.0.0 has now been released

@gr2m gr2m self-assigned this May 25, 2021
@ghost ghost moved this from Maintenance to In progress in JS May 25, 2021
@gr2m gr2m dismissed wolfy1339’s stale review May 25, 2021 22:49

ts-jest has been updated

@gr2m
Copy link
Contributor

gr2m commented May 25, 2021

The "express middleware no mount path no next" test is currently failing for me in test/integration/node-middleware.test.ts. But when I run it in isolation it works

npx jest -t "express middleware no mount path no next" test/integration/node-middleware.test.ts

I'm not sure what the problem here is. @wolfy1339 any idea what it could be?

@gr2m gr2m removed their assignment May 25, 2021
@ghost ghost moved this from In progress to Maintenance in JS May 25, 2021
@wolfy1339
Copy link
Member

wolfy1339 commented May 25, 2021

The "express middleware no mount path no next" test is currently failing for me in test/integration/node-middleware.test.ts. But when I run it in isolation it works

npx jest -t "express middleware no mount path no next" test/integration/node-middleware.test.ts

I'm not sure what the problem here is. >@wolfy1339 any idea what it could be?

I had the same problem in my PR #552
The only solution I had found was to put the Webhooks middleware last after any other express middleware.

@gr2m
Copy link
Contributor

gr2m commented May 25, 2021

The only solution I had found was to put the Webhooks middleware last before any other express middleware.

I've read something in the release notes that the running order might change with v27, so that is probably what we see here.

I think we have to figure this out for good now :D

@wolfy1339
Copy link
Member

@G-Rath @oscard0m Would you like to assist in debugging this?

@oscard0m
Copy link
Member

@G-Rath @oscard0m Would you like to assist in debugging this?

Hi @wolfy1339. I'm sorry but these days I have a limited amount of time to check into this. Just to get context and catch up with Octokit status, how critical is this upgrade? Is it blocking ESModules migration?

@wolfy1339
Copy link
Member

Hi @wolfy1339. I'm sorry but these days I have a limited amount of time to check into this. Just to get context and catch up with Octokit status, how critical is this upgrade? Is it blocking ESModules migration?

Native ESM was introduced in this Jest version, so I think it is a critical piece to the migration

@G-Rath
Copy link
Member

G-Rath commented May 28, 2021

Likewise I've had a bit of an explosion in work (which is why I've not been able to help out as much lately 😞).

In saying that...

This is because you're calling jest.useFakeTimers, which is a global operation within the file - if you add a jest.useRealTimers call at the start of the test that's failing, it'll start passing :)

Ideally you should add that to all of the tests in the file to ensure the right type of timers (real or fake) are used for each test.

@oscard0m
Copy link
Member

oscard0m commented May 28, 2021

Likewise I've had a bit of an explosion in work (which is why I've not been able to help out as much lately 😞).

No worries @G-Rath, I hope everything gets stable soon. 💪🏽
Lots of positive energy to Software Gods.

In my case I lost my job due to COVID situation and now I'm focusing in learning React, building my profile, etc. As soon as I solve my professional situacion I will get back. I'm willing to catch up with all the things you have built lately.

In saying that...

This is because you're calling jest.useFakeTimers, which is a global operation within the file - if you add a jest.useRealTimers call at the start of the test that's failing, it'll start passing :)

Ideally you should add that to all of the tests in the file to ensure the right type of timers (real or fake) are used for each test.

EDIT: Checking out and trying this!
Added jest.useRealTimers() inside an afterEach so it is easier for future unit tests.

NICE CATCH @G-Rath
image

@oscard0m oscard0m requested review from G-Rath and wolfy1339 May 28, 2021 21:08
@wolfy1339 wolfy1339 changed the title chore(deps): update jest monorepo to v27 (major) chore(deps): update jest monorepo and ts-jest to v27 (major) May 28, 2021
@oscard0m oscard0m merged commit 67ec3ff into master May 28, 2021
@oscard0m oscard0m deleted the renovate/major-jest-monorepo branch May 28, 2021 21:14
JS automation moved this from Maintenance to Done May 28, 2021
@gr2m
Copy link
Contributor

gr2m commented May 28, 2021

Great work y’all, thank you!

@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2021

🎉 This PR is included in version 9.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR
Projects
No open projects
JS
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants