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