jestjs / jest

Delightful JavaScript Testing.
https://jestjs.io
MIT License
44.28k stars 6.47k forks source link

fix: correctly copy getters in `deepCyclicCopy` #15265

Open SimenB opened 2 months ago

SimenB commented 2 months ago

Summary

Fixes #15196

deepCyclicCopyReplaceable just accesses the value unconditionally, but we have tests in deepCyclicCopy that getters are not accessed.

https://github.com/jestjs/jest/blob/91e80829a08b03ed7c0166e59543cd2a6b20d08b/packages/jest-matcher-utils/src/deepCyclicCopyReplaceable.ts#L104-L109

Not sure if this is the correct approach, but seems fine? Let's see what CI says

Test plan

Unit test added

netlify[bot] commented 2 months ago

Deploy Preview for jestjs ready!

Name Link
Latest commit 2ecfd4eefe65303bf6275ac04a03de28db96d719
Latest deploy log https://app.netlify.com/sites/jestjs/deploys/66c44bacf6a7490008b7f99c
Deploy Preview https://deploy-preview-15265--jestjs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.