Fix lifecycle hook function types#10480
Fix lifecycle hook function types#10480SimenB merged 1 commit intojestjs:masterfrom villasv:fix-10066
Conversation
|
Ideally this'd include type tests (based on #10407), but we don't have any tests for these globals, so possibly out of scope? |
|
Added a new test file for the globals. The test successfully fails™ before the suggested changes, but is now passing. It doesn't test exactly what I wanted (I wanted to test the argument types, it's testing the function return types), but it does the job. |
SimenB
left a comment
There was a problem hiding this comment.
Wonderful, thanks! Could you update the changelog as well?
|
Wasn't sure where to put it, left it on the |
Exactly right 👍 |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Fixes #10066
Test plan
Added a new type test suite for the @jest/globals to ensure lifecycle hooks are not typed as
HookFnthat could returnPromise, but are at least functions that returnvoid.