Type safe mocking extensions for Jest https://www.npmjs.com/package/jest-mock-extended
Fixed Deep Mock perf issue with https://github.com/marchaos/jest-mock-extended/pull/123
Allow overriding calledWithFn - see https://github.com/marchaos/jest-mock-extended/pull/96
mockDeep({ funcPropSupport: true });
however this comes with a recursive performance cost. We hope to address this in the future.
Support for Jest 28
Fixes:
PRs:
mock()
to no longer use recursive types. Only deepMock()
does that now. This should reduce the tsc
compile time for large projects.stub()
for usecases where you need a mock object with no expectations.Potential backwards compatibility issues for use of mock() where deepMock() may be required. This may result in TS errors.