diff options
Diffstat (limited to 'test/language/expressions/delete/11.4.1-4-a-1-s.js')
-rw-r--r-- | test/language/expressions/delete/11.4.1-4-a-1-s.js | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/test/language/expressions/delete/11.4.1-4-a-1-s.js b/test/language/expressions/delete/11.4.1-4-a-1-s.js index cd5b561e9..73544a0fd 100644 --- a/test/language/expressions/delete/11.4.1-4-a-1-s.js +++ b/test/language/expressions/delete/11.4.1-4-a-1-s.js @@ -7,21 +7,14 @@ description: > Strict Mode - TypeError is thrown when deleting non-configurable data property flags: [onlyStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; Object.defineProperty(obj, "prop", { value: "abc", configurable: false }); - - try { +assert.throws(TypeError, function() { delete obj.prop; - return false; - } catch (e) { - return e instanceof TypeError && obj.prop === "abc"; - } - } -runTestCase(testcase); +}); +assert.sameValue(obj.prop, "abc", 'obj.prop'); |