Skip to content

Commit

Permalink
Fix TestCaseRecord proxy (#3948)
Browse files Browse the repository at this point in the history
This needs to check local properties otherwise
they don't get forwarded.

In particular `t.rec.debugging` was undefined in a test
since it wasn't being fowarded by the proxy.
  • Loading branch information
greggman authored Sep 12, 2024
1 parent 3208356 commit e5c2484
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/internal/test_group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ class RunCaseSpecific implements RunCase {
const subcasePrefix = 'subcase: ' + stringifyPublicParams(subParams);
const subRec = new Proxy(rec, {
get: (target, k: keyof TestCaseRecorder) => {
const prop = TestCaseRecorder.prototype[k];
const prop = rec[k] ?? TestCaseRecorder.prototype[k];
if (typeof prop === 'function') {
testHeartbeatCallback();
return function (...args: Parameters<typeof prop>) {
Expand Down

0 comments on commit e5c2484

Please sign in to comment.