Sign in
webkit
/
WebKit
/
9a43d7e8bb9093ccc493831ef3377ee933abb11e
/
.
/
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
);