summaryrefslogtreecommitdiff
path: root/test/built-ins/Object/entries
diff options
context:
space:
mode:
authorRick Waldron <waldron.rick@gmail.com>2018-02-09 11:35:37 -0500
committerLeo Balter <leonardo.balter@gmail.com>2018-02-09 11:35:37 -0500
commita01de4a722d088055a7d84d8c691ddd7109edb34 (patch)
treef583c8efd40a3b699261f1166da75a9861d83e7b /test/built-ins/Object/entries
parent7b01f9799f99851955f23c18c12e6651c1941022 (diff)
downloadqtdeclarative-testsuites-a01de4a722d088055a7d84d8c691ddd7109edb34.tar.gz
js-beautify: make all indentation consistent (depth & character) (#1409)
Diffstat (limited to 'test/built-ins/Object/entries')
-rw-r--r--test/built-ins/Object/entries/exception-during-enumeration.js16
-rw-r--r--test/built-ins/Object/entries/exception-not-object-coercible.js8
-rw-r--r--test/built-ins/Object/entries/function-name.js6
-rw-r--r--test/built-ins/Object/entries/getter-adding-key.js10
-rw-r--r--test/built-ins/Object/entries/getter-making-future-key-nonenumerable.js16
-rw-r--r--test/built-ins/Object/entries/getter-removing-future-key.js12
-rw-r--r--test/built-ins/Object/entries/observable-operations.js14
-rw-r--r--test/built-ins/Object/entries/symbols-omitted.js9
-rw-r--r--test/built-ins/Object/entries/tamper-with-global-object.js2
-rw-r--r--test/built-ins/Object/entries/tamper-with-object-keys.js6
10 files changed, 55 insertions, 44 deletions
diff --git a/test/built-ins/Object/entries/exception-during-enumeration.js b/test/built-ins/Object/entries/exception-during-enumeration.js
index 0720a47f0..c4dba3f55 100644
--- a/test/built-ins/Object/entries/exception-during-enumeration.js
+++ b/test/built-ins/Object/entries/exception-during-enumeration.js
@@ -8,14 +8,14 @@ author: Jordan Harband
---*/
var trappedKey = {
- get a() {
- throw new RangeError('This error should be re-thrown');
- },
- get b() {
- $ERROR('Should not try to get the second element');
- }
+ get a() {
+ throw new RangeError('This error should be re-thrown');
+ },
+ get b() {
+ $ERROR('Should not try to get the second element');
+ }
};
-assert.throws(RangeError, function () {
- Object.entries(trappedKey);
+assert.throws(RangeError, function() {
+ Object.entries(trappedKey);
});
diff --git a/test/built-ins/Object/entries/exception-not-object-coercible.js b/test/built-ins/Object/entries/exception-not-object-coercible.js
index de90d9d6c..75e73145e 100644
--- a/test/built-ins/Object/entries/exception-not-object-coercible.js
+++ b/test/built-ins/Object/entries/exception-not-object-coercible.js
@@ -7,10 +7,10 @@ description: Object.entries should fail if given a null or undefined value
author: Jordan Harband
---*/
-assert.throws(TypeError, function () {
- Object.entries(null);
+assert.throws(TypeError, function() {
+ Object.entries(null);
});
-assert.throws(TypeError, function () {
- Object.entries(undefined);
+assert.throws(TypeError, function() {
+ Object.entries(undefined);
});
diff --git a/test/built-ins/Object/entries/function-name.js b/test/built-ins/Object/entries/function-name.js
index ec6db2ffc..7f336d253 100644
--- a/test/built-ins/Object/entries/function-name.js
+++ b/test/built-ins/Object/entries/function-name.js
@@ -9,9 +9,9 @@ includes: [propertyHelper.js]
---*/
assert.sameValue(
- Object.entries.name,
- 'entries',
- 'Expected Object.entries.name to be "entries"'
+ Object.entries.name,
+ 'entries',
+ 'Expected Object.entries.name to be "entries"'
);
verifyNotEnumerable(Object.entries, 'name');
diff --git a/test/built-ins/Object/entries/getter-adding-key.js b/test/built-ins/Object/entries/getter-adding-key.js
index 09eca7b16..f8843919a 100644
--- a/test/built-ins/Object/entries/getter-adding-key.js
+++ b/test/built-ins/Object/entries/getter-adding-key.js
@@ -8,11 +8,11 @@ author: Jordan Harband
---*/
var bAddsC = {
- a: 'A',
- get b() {
- this.c = 'C';
- return 'B';
- }
+ a: 'A',
+ get b() {
+ this.c = 'C';
+ return 'B';
+ }
};
var result = Object.entries(bAddsC);
diff --git a/test/built-ins/Object/entries/getter-making-future-key-nonenumerable.js b/test/built-ins/Object/entries/getter-making-future-key-nonenumerable.js
index c3e3cc721..3007fe051 100644
--- a/test/built-ins/Object/entries/getter-making-future-key-nonenumerable.js
+++ b/test/built-ins/Object/entries/getter-making-future-key-nonenumerable.js
@@ -8,14 +8,14 @@ author: Jordan Harband
---*/
var bDeletesC = {
- a: 'A',
- get b() {
- Object.defineProperty(this, 'c', {
- enumerable: false
- });
- return 'B';
- },
- c: 'C'
+ a: 'A',
+ get b() {
+ Object.defineProperty(this, 'c', {
+ enumerable: false
+ });
+ return 'B';
+ },
+ c: 'C'
};
var result = Object.entries(bDeletesC);
diff --git a/test/built-ins/Object/entries/getter-removing-future-key.js b/test/built-ins/Object/entries/getter-removing-future-key.js
index 05ef0d512..7953236d1 100644
--- a/test/built-ins/Object/entries/getter-removing-future-key.js
+++ b/test/built-ins/Object/entries/getter-removing-future-key.js
@@ -8,12 +8,12 @@ author: Jordan Harband
---*/
var bDeletesC = {
- a: 'A',
- get b() {
- delete this.c;
- return 'B';
- },
- c: 'C'
+ a: 'A',
+ get b() {
+ delete this.c;
+ return 'B';
+ },
+ c: 'C'
};
var result = Object.entries(bDeletesC);
diff --git a/test/built-ins/Object/entries/observable-operations.js b/test/built-ins/Object/entries/observable-operations.js
index d80b50651..d43cc5530 100644
--- a/test/built-ins/Object/entries/observable-operations.js
+++ b/test/built-ins/Object/entries/observable-operations.js
@@ -10,27 +10,31 @@ includes: [proxyTrapsHelper.js]
---*/
var log = "";
-var object = { a: 0, b: 0, c: 0 };
+var object = {
+ a: 0,
+ b: 0,
+ c: 0
+};
var handler = allowProxyTraps({
- get: function (target, propertyKey, receiver) {
+ get: function(target, propertyKey, receiver) {
assert.sameValue(target, object, "get target");
assert.sameValue(receiver, proxy, "get receiver");
log += "|get:" + propertyKey;
return target[propertyKey];
},
- 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/entries/symbols-omitted.js b/test/built-ins/Object/entries/symbols-omitted.js
index 076c16777..d753ee64e 100644
--- a/test/built-ins/Object/entries/symbols-omitted.js
+++ b/test/built-ins/Object/entries/symbols-omitted.js
@@ -13,9 +13,14 @@ 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, { enumerable: false, value: value });
+Object.defineProperty(obj, nonEnumSym, {
+ enumerable: false,
+ value: value
+});
var result = Object.entries(obj);
diff --git a/test/built-ins/Object/entries/tamper-with-global-object.js b/test/built-ins/Object/entries/tamper-with-global-object.js
index 1ad4e18a2..cea8a87bb 100644
--- a/test/built-ins/Object/entries/tamper-with-global-object.js
+++ b/test/built-ins/Object/entries/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.entries = Object.entries;
diff --git a/test/built-ins/Object/entries/tamper-with-object-keys.js b/test/built-ins/Object/entries/tamper-with-object-keys.js
index 10e8a6d5f..7217292f0 100644
--- a/test/built-ins/Object/entries/tamper-with-object-keys.js
+++ b/test/built-ins/Object/entries/tamper-with-object-keys.js
@@ -9,10 +9,12 @@ author: Jordan Harband
---*/
function fakeObjectKeys() {
- $ERROR('The overriden version of Object.keys was called!');
+ $ERROR('The overriden version of Object.keys was called!');
}
Object.keys = fakeObjectKeys;
assert.sameValue(Object.keys, fakeObjectKeys, 'Sanity check failed: could not modify the global Object.keys');
-assert.sameValue(Object.entries({ a: 1 }).length, 1, 'Expected object with 1 key to have 1 entry');
+assert.sameValue(Object.entries({
+ a: 1
+}).length, 1, 'Expected object with 1 key to have 1 entry');