fix(util): handle diff edge cases - #40166
deepshekhardas wants to merge 4 commits into
Conversation
When toMatchInlineSnapshot() is the last expression of a test function body, JavaScriptCore applies tail-call optimization and elides the caller frame, so get_caller_src_loc() returns an empty location and the snapshot writer reports 'called from file: '. expect() itself is never in tail position (its result feeds the matcher member access), so capture its caller src loc when the Expect is created and fall back to it when the matcher walk finds nothing. The matcher call site is then relocated by reading the test file and finding the fn_name( call at/after the expect() position.
|
Warning Review limit reachedYour included review limit has been reached. You’re in a promotional period — use the checkbox below to run this review for free:
On-demand reviews are free for the next 29 days. After that, they cost $0.25 per reviewed file. How can I continue?Run this review now using the option above, or comment You can also wait for the limit to reset (next review available in 36 minutes), then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thank you for the PR. This branch is the same commit (ff02959) as #39749. #39749 was closed on August 20 in favor of #39731, and #39731 is still open for #39728. To keep one PR per issue in the review queue, I am closing this one as a duplicate of #39731. As noted on #39749: both PRs port the same Myers diff from Node, and the output of #39731 matched Node 26.3.0 on 3593 random string and array pairs. The This branch also still carries the commits of #40157, #39744 and #39748, so it could not merge on its own. Please branch each change from |
Fixes #39728
Handle util.diff edge cases.