summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Tests/Object.defineProperty.js
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibJS/Tests/Object.defineProperty.js')
-rw-r--r--Libraries/LibJS/Tests/Object.defineProperty.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/Libraries/LibJS/Tests/Object.defineProperty.js b/Libraries/LibJS/Tests/Object.defineProperty.js
index fee37f9e78..f5e234d2f9 100644
--- a/Libraries/LibJS/Tests/Object.defineProperty.js
+++ b/Libraries/LibJS/Tests/Object.defineProperty.js
@@ -26,12 +26,11 @@ try {
assert(d.writable === true);
assert(d.value === "ho");
- try {
+ assertThrowsError(() => {
Object.defineProperty(o, "bar", { value: "xx", enumerable: false });
- assertNotReached();
- } catch (e) {
- assert(e.name === "TypeError");
- }
+ }, {
+ error: TypeError
+ });
Object.defineProperty(o, "baz", { value: 9, configurable: true, writable: false });
Object.defineProperty(o, "baz", { configurable: true, writable: true });