From 741caf7c12bbba98253130250ff37f8f5ea4a1d5 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 23 Oct 2015 11:25:25 -0700 Subject: [PATCH] [Tests] Don't attempt to define properties on this test object unless we're in true ES5. --- test/reflect.js | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/test/reflect.js b/test/reflect.js index 4a94a690..6c9015fb 100644 --- a/test/reflect.js +++ b/test/reflect.js @@ -35,23 +35,25 @@ describe('Reflect', function () { _value: 0 }; - Object.defineProperties(object, { - value: { - get: function () { - return this._value; - } - }, + if (supportsDescriptors) { + Object.defineProperties(object, { + value: { + get: function () { + return this._value; + } + }, - setter: { - set: function (val) { - this._value = val; - } - }, + setter: { + set: function (val) { + this._value = val; + } + }, - bool: { - value: true - } - }); + bool: { + value: true + } + }); + } var testXThrow = function (values, func) { function checker(item) {