-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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(jest): upgrade to 27.0.3 #12454
Conversation
@@ -103,7 +103,6 @@ describe('ReportUIFeatures', () => { | |||
global.I18n = undefined; | |||
global.ReportUIFeatures = undefined; | |||
global.matchMedia = undefined; | |||
global.self.matchMedia = undefined; |
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.
I.... have no idea how this was working ... but I am extremely curious.
maybe before global.self === global
and now it does not? In Chrome self === globalThis.self
, so circular global object references makes some sort of sense, but maybe Jest decided to remove that behavior for global
.
@@ -119,17 +119,21 @@ describe('lightrider-entry', () => { | |||
runStub.mockRestore(); | |||
}); | |||
|
|||
let originalRun; |
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.
jestjs/jest#9828 disallowed these functions from being nested in a test case.
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.
oh dang yeah, I did not expect that to work haha
@@ -119,17 +119,21 @@ describe('lightrider-entry', () => { | |||
runStub.mockRestore(); | |||
}); | |||
|
|||
let originalRun; |
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.
oh dang yeah, I did not expect that to work haha
The |
@@ -79,7 +79,7 @@ describe('Lighthouse Viewer', () => { | |||
if (pageErrors.length > 0) console.error(pageErrors); | |||
|
|||
await Promise.all([ | |||
new Promise(resolve => server.close(resolve)), | |||
server.close(), |
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.
Another brainteaser!
server.close
doesn't take any parameters. This file is not typechecked, so this wasn't caught. If this were a raw http.Server
object, it would work as written. This mistake happened because of the StaticServer refactor.
The brainteaser is... why did this ever work? I suppose before, Jest simply gave up at some point and shutdown. But now it will fail if afterPass
hangs.
can we avoid updating our test runner before the release which depends on our test runner, though :) |
this can land whenever idc. i had 10 minutes to kill to i upgraded the pr |
This is the latest beta release. The latest official release does not yet have #7792, andI'm fed up with manually fixing things when using-u
, so here we are.You can verify the new feature works by adding a number to:
https://github.com/GoogleChrome/lighthouse/blob/30ebe53/lighthouse-core/audits/script-treemap-data.js#L209
and running
yarn jest script-treemap-data -u
. Only the inline snapshot strings will change.