-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Deps: Update Jest to 22 #20943
Deps: Update Jest to 22 #20943
Conversation
Test live: https://calypso.live/?branch=update/jest-22 |
CircleCi doesn't look as happy as we do :D |
Nope, not ready yet, still in progress. Only 2 failures though 😁 |
This fixes a test issue by sidestepping it. I prefer this to focus on the Jest upgrade, but it would be nice to migrate these tests to enzyme which would likely solve this problem.
document.querySelector( '.button.is-primary' ).click(); | ||
expect( document.querySelector( '.accept-dialog' ) ).to.be.null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was surprisingly difficult to come to this simple solution this test fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol, should work as expected when you compare with one of the previous tests :)
There are some strange errors coming from |
Those were a surprise, yes I've started investigating. |
This was causing issues with eslint-eslines on CI
The upgraded Ready for review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ it, 🚢 it!
So they bumped version to 22.0.3, interesting :) |
I've just tried the new experimental npm run test-client -- --detectLeaks I expected some unusual behavior, but it fails for every single test, both client and server. I'm curious what we're doing to cause that 🤔 |
Let me know if you discover what is causing those leaks. It might be the fact that we disable network traffic in here: https://github.com/Automattic/wp-calypso/blob/master/test/client/setup-test-framework.js#L11. You can also try to compare with Gutenberg which has a slightly different setup. |
Updates Jest to v22.
This PR also gets us off of a beta release of
jest-docblock
👍Thanks @gziolo for the nudge WordPress/gutenberg#4073 (review)
Notable improvements:
requestAnimationFrame
warnings shown during tests are gone 🎉jest-docblock
out of betaFollow up
jest-runner-eslint
Testing