marchaos / jest-mock-extended

Type safe mocking extensions for Jest https://www.npmjs.com/package/jest-mock-extended
MIT License
828 stars 57 forks source link

Ensure mocks pass jest equality tests #41

Closed laurence-hudson-mindfoundry closed 4 years ago

laurence-hudson-mindfoundry commented 4 years ago

Fixes: #9 & #28

In Jest 24.x this presents as "Cannot read property 'next' of undefined" In Jest 25.x & Jest 26.x this presents as "TypeError: Result of the Symbol.iterator method is not an object" This patch works for all 3 versions.

I've also checked it works with PR #33 (and is still needed even if that gets merged).

@marchaos Thanks for all your work on this. Really neat package :partying_face: