dillon1000/react

Commit

[test] Fix Error Proxy stack assignment in Node.js 21+ (#36967)

Same as #35227, but for `set`.

V8's `stack` setter silently noops when `this` is a Proxy
(nodejs/node#60862), so prodstack-stripping assignments like
`error.stack = 'Error: ' + message` in `resolveErrorProd` were dropped
and reads returned the real stack.

This caused `yarn test --prod` failures on Node 21+.

## Test Plan

`yarn test --prod` passes on both old and new Nodes.

Co-authored-by: Claude Fable 5 <[email protected]>
Browse files
Changed paths1 file
First-parent comparison
M scripts/jest/setupTests.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…