-
Notifications
You must be signed in to change notification settings - Fork 604
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
[heft]: The mocked
helper from @types/heft-jest
might be unnecessary
#3609
Comments
@octogonz - you originally put this together. Thoughts? |
We don't support Jest 28 yet, but we should soon. |
HBO was using this API. @elliot-nelson can you comment on the impact of removing it? How much work would be required to fix up your tests? |
I see. So my idea might be premature. Just to add more detail. Jest v27.4 shipped with |
@octogonz I believe we are on Jest 27.0, and we are using the But if the work is "switch to |
Summary
If I get it right, the purpose of
@types/heft-jest
is to providemocked()
helper. Seems like code was copied fromts-jest
.The fact is that it was moved to
jest
(from v28) and removed fromts-jest
completely. Now this isjest.mocked()
.Perhaps it is time to deprecate
@types/heft-jest
package? And to tweak Heft documentation as well?Details
I am not a user of Heft, but I have put some effort to rework
jest.mocked()
and to addjest.Mocked<T>
recently. So I am interested to inform Jest user about these improved/new APIs. Could not figure out which version of Jest ships with Heft. These are the links to Jest v29 (latest):jest.Mocked<T>
: https://jestjs.io/docs/mock-function-api/#jestmockedsourcejest.mocked()
: https://jestjs.io/docs/mock-function-api/#jestmockedsource-optionsStandard questions
Please answer these questions to help us investigate your issue more quickly:
@rushstack/heft
version?node -v
)?The text was updated successfully, but these errors were encountered: