summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/element-accessor.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/element-accessor.js')
-rw-r--r--deps/v8/test/mjsunit/element-accessor.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/deps/v8/test/mjsunit/element-accessor.js b/deps/v8/test/mjsunit/element-accessor.js
index 5fba359c2a..94acc5c6c3 100644
--- a/deps/v8/test/mjsunit/element-accessor.js
+++ b/deps/v8/test/mjsunit/element-accessor.js
@@ -29,9 +29,15 @@
})();
(function () {
- var o = new Int32Array();
- Object.defineProperty(o, "0", {get: function(){}});
- assertEquals(undefined, Object.getOwnPropertyDescriptor(o, "0"));
+ var o = new Int32Array(1);
+ assertThrows(
+ () => Object.defineProperty(o, '0', {get: function() {}}), TypeError);
+ assertEquals({
+ value: 0,
+ writable: true,
+ enumerable: true,
+ configurable: false
+ }, Object.getOwnPropertyDescriptor(o, "0"));
})();
(function() {