mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 03:18:53 +00:00
## Summary - Added null check for `sourceOrigin` before accessing its URL in `jest.mock()` - When `callerSourceOrigin()` returns null (e.g., when called with invalid arguments), the code now safely returns early instead of crashing ## Test plan - [x] Added regression test `test/regression/issue/ENG-24434.test.ts` - [x] `bun bd test test/regression/issue/ENG-24434.test.ts` passes Fixes ENG-24434 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude <noreply@anthropic.com>