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