diff options
Diffstat (limited to 'test/built-ins/Object/defineProperty/15.2.3.6-4-565.js')
-rw-r--r-- | test/built-ins/Object/defineProperty/15.2.3.6-4-565.js | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-565.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-565.js index d52f342c5..6876df415 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-4-565.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-565.js @@ -7,10 +7,8 @@ description: > ES5 Attributes - fail to update the accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to a data property -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; var getFunc = function () { @@ -29,17 +27,12 @@ function testcase() { configurable: false }); var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); - - try { +assert.throws(TypeError, function() { Object.defineProperty(obj, "prop", { value: 1001 }); - - return false; - } catch (e) { +}); var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); - return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError; - } - } -runTestCase(testcase); +assert(desc1.hasOwnProperty("get"), 'desc1.hasOwnProperty("get") !== true'); +assert.sameValue(desc2.hasOwnProperty("value"), false, 'desc2.hasOwnProperty("value")'); |