From e5c24840c860d8a137834c42f851361b1df54aa2 Mon Sep 17 00:00:00 2001 From: Greggman Date: Thu, 12 Sep 2024 12:22:43 -0700 Subject: [PATCH] Fix TestCaseRecord proxy (#3948) 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. --- src/common/internal/test_group.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/internal/test_group.ts b/src/common/internal/test_group.ts index e1d0cde12d5c..aaaec9fe3f3a 100644 --- a/src/common/internal/test_group.ts +++ b/src/common/internal/test_group.ts @@ -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) {