Sign in
webkit
/
WebKit
/
34f5efbbe2903324708c7d6f83220e30b3f6ddd8
/
.
/
JSTests
/
stress
/
global-object-read-modify-write-remove-at-get.js
blob: 1bda245e0c4f54950825e364fdb2ff1af08d0a08 [
file
] [
log
] [
blame
]
function
shouldBe
(
actual
,
expected
)
{
if
(
actual
!==
expected
)
throw
new
Error
(
'bad value: '
+
actual
);
}
Object
.
defineProperty
(
globalThis
,
'x'
,
{
get
()
{
delete
globalThis
.
x
;
return
2
;
},
configurable
:
true
,
});
x
+=
42
;
shouldBe
(
x
,
44
);