feat: add onGenerateMock transformer callback (#15429)#15433
Conversation
✅ Deploy Preview for jestjs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
ec88557 to
1e3405a
Compare
SimenB
left a comment
There was a problem hiding this comment.
this is awesome, thanks!
mind adding some docs in https://github.com/jestjs/jest/blob/main/docs/JestObjectAPI.md as well?
|
Sure |
1e3405a to
b51c79d
Compare
Head branch was pushed to by a user without write access
| * | ||
| * @param cb | ||
| */ | ||
| onGenerateMock<T>(cb: (moduleName: string, moduleMock: T) => T): Jest; |
There was a problem hiding this comment.
this is duplicated now, unless I'm seeing things 😅
There was a problem hiding this comment.
It seems rebase breaks 😃
6586efb to
b709d31
Compare
|
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
Add ability to modify generated mock within presets or project code (Closes #15429, thymikee/jest-preset-angular#2908)
Test plan
Run test in
packages/jest-runtime/src/__tests__/runtime_mock.test.js