🧪 add missing error test for untrack() - #99
undivisible wants to merge 1 commit into
Conversation
Adds a rigorous integration test to ensure that the `untrack` function successfully restores the previous dependency tracker context even if the execution of its callback throws an error. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_c2b6abfd-33a9-4f28-8196-496637b14502) |
🎯 What: The testing gap where
untrack'sfinallyblock wasn't verified on thrown errors.📊 Coverage: Now tests the exact tracking state before, during, and after an intentionally thrown error using reactive primitives, guaranteeing
currentTrackerrestoration is bulletproof.✨ Result: Better confidence in
untrackerror handling with no risk of state leakages.PR created automatically by Jules for task 16104283232866966348 started by @undivisible
Note
Low Risk
Test-only change with no production code modifications.
Overview
Adds a regression test under the
untracksuite that throws inside anuntrackcallback and asserts the outer reactive tracker is restored (mirroring the existingcollectDepserror test).The scenario uses a memo that tracks
s1ands3, readss2only insideuntrack, then throws; afterward updates tos2must not re-run the memo, whiles1ands3still invalidate it.Reviewed by Cursor Bugbot for commit 08dc949. Configure here.