diff options
Diffstat (limited to 'test/built-ins/Object/getOwnPropertyDescriptors')
9 files changed, 21 insertions, 33 deletions
diff --git a/test/built-ins/Object/getOwnPropertyDescriptors/exception-not-object-coercible.js b/test/built-ins/Object/getOwnPropertyDescriptors/exception-not-object-coercible.js index c7d152060..c11aee65f 100644 --- a/test/built-ins/Object/getOwnPropertyDescriptors/exception-not-object-coercible.js +++ b/test/built-ins/Object/getOwnPropertyDescriptors/exception-not-object-coercible.js @@ -7,10 +7,10 @@ esid: sec-object.getownpropertydescriptors author: Jordan Harband ---*/ -assert.throws(TypeError, function() { - Object.getOwnPropertyDescriptors(null); +assert.throws(TypeError, function () { + Object.getOwnPropertyDescriptors(null); }); -assert.throws(TypeError, function() { - Object.getOwnPropertyDescriptors(undefined); +assert.throws(TypeError, function () { + Object.getOwnPropertyDescriptors(undefined); }); diff --git a/test/built-ins/Object/getOwnPropertyDescriptors/function-name.js b/test/built-ins/Object/getOwnPropertyDescriptors/function-name.js index c2e98cf19..1c1f3a6b7 100644 --- a/test/built-ins/Object/getOwnPropertyDescriptors/function-name.js +++ b/test/built-ins/Object/getOwnPropertyDescriptors/function-name.js @@ -9,9 +9,9 @@ includes: [propertyHelper.js] ---*/ assert.sameValue( - Object.getOwnPropertyDescriptors.name, - 'getOwnPropertyDescriptors', - 'Expected Object.getOwnPropertyDescriptors.name to be "getOwnPropertyDescriptors"' + Object.getOwnPropertyDescriptors.name, + 'getOwnPropertyDescriptors', + 'Expected Object.getOwnPropertyDescriptors.name to be "getOwnPropertyDescriptors"' ); verifyNotEnumerable(Object.getOwnPropertyDescriptors, 'name'); diff --git a/test/built-ins/Object/getOwnPropertyDescriptors/inherited-properties-omitted.js b/test/built-ins/Object/getOwnPropertyDescriptors/inherited-properties-omitted.js index 574dbb8ed..1522f5936 100644 --- a/test/built-ins/Object/getOwnPropertyDescriptors/inherited-properties-omitted.js +++ b/test/built-ins/Object/getOwnPropertyDescriptors/inherited-properties-omitted.js @@ -7,7 +7,7 @@ esid: sec-object.getownpropertydescriptors author: Jordan Harband ---*/ -var F = function() {}; +var F = function () {}; F.prototype.a = {}; F.prototype.b = {}; diff --git a/test/built-ins/Object/getOwnPropertyDescriptors/observable-operations.js b/test/built-ins/Object/getOwnPropertyDescriptors/observable-operations.js index c7f70689c..90582f0e4 100644 --- a/test/built-ins/Object/getOwnPropertyDescriptors/observable-operations.js +++ b/test/built-ins/Object/getOwnPropertyDescriptors/observable-operations.js @@ -10,25 +10,21 @@ includes: [proxyTrapsHelper.js] ---*/ var log = ""; -var object = { - a: 0, - b: 0, - c: 0 -}; +var object = { a: 0, b: 0, c: 0 }; var handler = allowProxyTraps({ - getOwnPropertyDescriptor: function(target, propertyKey) { + getOwnPropertyDescriptor: function (target, propertyKey) { assert.sameValue(target, object, "getOwnPropertyDescriptor"); log += "|getOwnPropertyDescriptor:" + propertyKey; return Object.getOwnPropertyDescriptor(target, propertyKey); }, - ownKeys: function(target) { + ownKeys: function (target) { assert.sameValue(target, object, "ownKeys"); log += "|ownKeys"; return Object.getOwnPropertyNames(target); } }); var check = allowProxyTraps({ - get: function(target, propertyKey, receiver) { + get: function (target, propertyKey, receiver) { assert(propertyKey in target, "handler check: " + propertyKey); return target[propertyKey]; } diff --git a/test/built-ins/Object/getOwnPropertyDescriptors/primitive-strings.js b/test/built-ins/Object/getOwnPropertyDescriptors/primitive-strings.js index 3ce4b71a9..4c7141411 100644 --- a/test/built-ins/Object/getOwnPropertyDescriptors/primitive-strings.js +++ b/test/built-ins/Object/getOwnPropertyDescriptors/primitive-strings.js @@ -30,3 +30,4 @@ assert.sameValue(result[2].configurable, false, 'index 2 is not configurable'); assert.sameValue(result[2].enumerable, true, 'index 2 is enumerable'); assert.sameValue(result[2].writable, false, 'index 2 is not writable'); assert.sameValue(result[2].value, 'c', 'index 2 is "c"'); + diff --git a/test/built-ins/Object/getOwnPropertyDescriptors/proxy-undefined-descriptor.js b/test/built-ins/Object/getOwnPropertyDescriptors/proxy-undefined-descriptor.js index f6bf1e078..b03df1304 100644 --- a/test/built-ins/Object/getOwnPropertyDescriptors/proxy-undefined-descriptor.js +++ b/test/built-ins/Object/getOwnPropertyDescriptors/proxy-undefined-descriptor.js @@ -12,9 +12,9 @@ includes: [proxyTrapsHelper.js] var key = "a"; var ownKeys = [key]; var badProxyHandlers = allowProxyTraps({ - getOwnPropertyDescriptor: function() {}, - ownKeys: function() { - return ownKeys; + getOwnPropertyDescriptor: function () {}, + ownKeys: function () { + return ownKeys; } }); var proxy = new Proxy({}, badProxyHandlers); diff --git a/test/built-ins/Object/getOwnPropertyDescriptors/symbols-included.js b/test/built-ins/Object/getOwnPropertyDescriptors/symbols-included.js index cbfa831d6..2cf49a087 100644 --- a/test/built-ins/Object/getOwnPropertyDescriptors/symbols-included.js +++ b/test/built-ins/Object/getOwnPropertyDescriptors/symbols-included.js @@ -13,16 +13,9 @@ var enumSym = Symbol('enum'); var nonEnumSym = Symbol('nonenum'); var symValue = Symbol('value'); -var obj = { - key: symValue -}; +var obj = { key: symValue }; obj[enumSym] = value; -Object.defineProperty(obj, nonEnumSym, { - writable: true, - enumerable: false, - configurable: true, - value: value -}); +Object.defineProperty(obj, nonEnumSym, { writable: true, enumerable: false, configurable: true, value: value }); var result = Object.getOwnPropertyDescriptors(obj); diff --git a/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-global-object.js b/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-global-object.js index 4fc046ae6..7239b18d8 100644 --- a/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-global-object.js +++ b/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-global-object.js @@ -9,7 +9,7 @@ author: Jordan Harband ---*/ function fakeObject() { - $ERROR('The overriden version of Object was called!'); + $ERROR('The overriden version of Object was called!'); } fakeObject.getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors; fakeObject.keys = Object.keys; diff --git a/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-object-keys.js b/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-object-keys.js index bfe13dd0d..6427b3d87 100644 --- a/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-object-keys.js +++ b/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-object-keys.js @@ -9,7 +9,7 @@ author: Jordan Harband ---*/ function fakeObjectGetOwnPropertyDescriptor() { - $ERROR('The overriden version of Object.getOwnPropertyDescriptor was called!'); + $ERROR('The overriden version of Object.getOwnPropertyDescriptor was called!'); } Object.getOwnPropertyDescriptor = fakeObjectGetOwnPropertyDescriptor; @@ -19,6 +19,4 @@ assert.sameValue( 'Sanity check failed: could not modify the global Object.getOwnPropertyDescriptor' ); -assert.sameValue(Object.keys(Object.getOwnPropertyDescriptors({ - a: 1 -})).length, 1, 'Expected object with 1 key to have 1 descriptor'); +assert.sameValue(Object.keys(Object.getOwnPropertyDescriptors({ a: 1 })).length, 1, 'Expected object with 1 key to have 1 descriptor'); |