feat(codemode): support JSON callbacks (#38006)

This commit is contained in:
Aiden Cline 2026-07-20 22:25:14 -05:00 committed by GitHub
commit 065b108bba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 431 additions and 61 deletions

View file

@ -889,6 +889,9 @@ describe("coercion parity: unknown static members read as undefined", () => {
"TypeError: Math.sum is not a function.",
)
expect(await value(`try { Math["sum"]([1]) } catch (e) { return e.message }`)).toBe("Math.sum is not a function.")
expect(await value(`try { JSON.rawJSON("1") } catch (e) { return e.message }`)).toBe(
"JSON.rawJSON is not a function.",
)
})
test("blocked members still throw instead of reading as undefined", async () => {