Jest: Include ts-jest mock util functions in jest core

Created on 7 Feb 2020  路  7Comments  路  Source: facebook/jest

馃殌 Feature Proposal

This proposal is for the outcome of the discussion in ts-jest that includests-jest mock util functions in jest core.

Motivation

Users don't have to install ts-jest anymore to access these util mocks, just need to install jest.

Pitch

Suggestion from @thymikee that it should belong to jest core

Feature Request Help Wanted TypeScript good first issue

Most helpful comment

Include as well another proposal in this area from https://github.com/kulshekhar/ts-jest/issues/1065

All 7 comments

Yeah, I think this is a good idea. There's been some changes to mocks in @types/jest as well, would be nice to bring the best features of both into Jest itself (at which point DT could pull the features from us instead).

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/a68259ee8883cc9899463fe79a78bb49a9d2f6de/types/jest/index.d.ts#L1042-L1298

Hi, can I take this issue?

Yes please! 馃檪

Hi @SimenB, I'm working on this issue and don't have much progress. I have some doubts about the approach that I should follow. Actually I didn't understand your first comment really well. Should I try to "use" definition on @types/jest on jest-mock package and work on top of it to add mocked fn from ts-jest?

Has this been abandoned? I can take a look

Include as well another proposal in this area from https://github.com/kulshekhar/ts-jest/issues/1065

got it, will do

Was this page helpful?
0 / 5 - 0 ratings