blob: 5ccfbe21db006379c8efb8882f4ab167339bc41e (
plain)
1
2
3
4
5
6
7
8
9
10
|
assertEq(
""+new Proxy(
{toString:() => "inner toString"},
{get:(t, pk) => (pk === "toString" ? () => "proxy toString" : t[pk])}),
"proxy toString")
assertEq(
""+new Proxy(
{valueOf:() => "inner valueOf"},
{get:(t, pk) => (pk === "valueOf" ? () => "proxy valueOf" : t[pk])}),
"proxy valueOf")
|