Skip to content

Commit

Permalink
grant access to original process
Browse files Browse the repository at this point in the history
tested projects might require access to the original process object. might fix both #5620 and #11165 .
  • Loading branch information
ValentinViennot authored Oct 28, 2024
1 parent 22029ba commit 86839ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/jest-util/src/createProcessObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,11 @@ export default function createProcessObject(): typeof Process {
},
});

Object.defineProperty(newProcess, 'original', {
get() {
return process;
},
});

return newProcess;
}

0 comments on commit 86839ae

Please sign in to comment.