From 9a437f2a55e5df728fa2b522a12595b68a2c79e2 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 21 Jul 2015 22:13:04 -0700 Subject: [PATCH] Small whitespacing tweaks. --- test-sham/set-prototype-of.js | 2 +- test/array.js | 10 +++++----- test/browser-onload.js | 2 +- test/browser-setup.js | 2 +- test/collections.js | 2 +- test/date.js | 2 +- test/math.js | 2 +- test/number.js | 2 +- test/object.js | 2 +- test/promise.js | 3 +-- test/promise/all.js | 4 +--- test/promise/evil-promises.js | 2 +- test/promise/promises-aplus.js | 2 +- test/promise/promises-es6.js | 2 +- test/promise/race.js | 2 +- test/promise/reject.js | 2 +- test/promise/resolve.js | 2 +- test/promise/simple.js | 2 +- test/promise/subclass.js | 2 +- test/reflect.js | 2 +- test/regexp.js | 2 +- test/string.js | 6 +++--- test/test_helpers.js | 2 +- test/worker-test.js | 2 +- 24 files changed, 30 insertions(+), 33 deletions(-) diff --git a/test-sham/set-prototype-of.js b/test-sham/set-prototype-of.js index e46bb6a0..06683b49 100644 --- a/test-sham/set-prototype-of.js +++ b/test-sham/set-prototype-of.js @@ -3,7 +3,7 @@ describe('Object.setPrototypeOf(o, p)', function () { 'use strict'; it('changes prototype to regular objects', function () { - var obj = {a: 123}; + var obj = { a: 123 }; expect(obj).to.be.an.instanceOf(Object); // sham requires assignment to work cross browser obj = Object.setPrototypeOf(obj, null); diff --git a/test/array.js b/test/array.js index 411bc8c1..4186e938 100644 --- a/test/array.js +++ b/test/array.js @@ -1,4 +1,4 @@ -/*global describe, it, xit, expect, require, beforeEach */ +/* global describe, it, xit, expect, require, beforeEach */ var runArrayTests = function () { 'use strict'; @@ -560,10 +560,10 @@ var runArrayTests = function () { describe('#next()', function () { it('should work when applied to an ArrayIterator', function () { - expect(arrayIterator.next.apply(arrayIterator)).to.eql({value: 0, done: false}); - expect(arrayIterator.next.apply(arrayIterator)).to.eql({value: 1, done: false}); - expect(arrayIterator.next.apply(arrayIterator)).to.eql({value: 2, done: false}); - expect(arrayIterator.next.apply(arrayIterator)).to.eql({value: undefined, done: true}); + expect(arrayIterator.next.apply(arrayIterator)).to.eql({ value: 0, done: false }); + expect(arrayIterator.next.apply(arrayIterator)).to.eql({ value: 1, done: false }); + expect(arrayIterator.next.apply(arrayIterator)).to.eql({ value: 2, done: false }); + expect(arrayIterator.next.apply(arrayIterator)).to.eql({ value: undefined, done: true }); }); it('throws when not applied to an ArrayIterator', function () { diff --git a/test/browser-onload.js b/test/browser-onload.js index f71096bf..29fd051e 100644 --- a/test/browser-onload.js +++ b/test/browser-onload.js @@ -1,4 +1,4 @@ -/*global window, mocha */ +/* global window, mocha */ if (typeof window !== 'undefined') { window.completedTests = 0; diff --git a/test/browser-setup.js b/test/browser-setup.js index 49f4e10f..bb417060 100644 --- a/test/browser-setup.js +++ b/test/browser-setup.js @@ -1,4 +1,4 @@ -/*global window, chai, mocha */ +/* global window, chai, mocha */ if (typeof window !== 'undefined') { chai.config.includeStack = true; diff --git a/test/collections.js b/test/collections.js index d3fbac48..a6b93e21 100644 --- a/test/collections.js +++ b/test/collections.js @@ -1,4 +1,4 @@ -/*global describe, it, expect, require, beforeEach, afterEach */ +/* global describe, it, expect, require, beforeEach, afterEach */ // Big thanks to V8 folks for test ideas. // v8/test/mjsunit/harmony/collections.js diff --git a/test/date.js b/test/date.js index a7f72552..4251a0bd 100644 --- a/test/date.js +++ b/test/date.js @@ -1,4 +1,4 @@ -/*global describe, it, expect, require */ +/* global describe, it, expect, require */ describe('Date', function () { it('when invalid, dates should toString to "Invalid Date"', function () { diff --git a/test/math.js b/test/math.js index f4d3a649..07607553 100644 --- a/test/math.js +++ b/test/math.js @@ -1,4 +1,4 @@ -/*global describe, it, expect, require */ +/* global describe, it, expect, require */ var Assertion = expect().constructor; Assertion.prototype.almostEqual = function (obj, precision) { diff --git a/test/number.js b/test/number.js index f5f16bd8..659e1473 100644 --- a/test/number.js +++ b/test/number.js @@ -1,4 +1,4 @@ -/*global describe, it, expect, require */ +/* global describe, it, expect, require */ describe('Number', function () { var functionsHaveNames = (function foo() {}).name === 'foo'; diff --git a/test/object.js b/test/object.js index ba4f9f08..4efa3281 100644 --- a/test/object.js +++ b/test/object.js @@ -1,4 +1,4 @@ -/*global describe, it, expect, require, Symbol */ +/* global describe, it, expect, require, Symbol */ describe('Object', function () { (typeof process !== 'undefined' && process.env.NO_ES6_SHIM ? it.skip : it)('is on the exported object', function () { diff --git a/test/promise.js b/test/promise.js index d4daa7c7..c976973c 100644 --- a/test/promise.js +++ b/test/promise.js @@ -1,4 +1,4 @@ -/*global describe, it, expect, require, Promise */ +/* global describe, it, expect, require, Promise */ /* This file is for testing implementation regressions of Promises. */ @@ -26,4 +26,3 @@ describe('Promise', function () { expect(Promise.prototype).not.to.have.property('chain'); }); }); - diff --git a/test/promise/all.js b/test/promise/all.js index f559b50b..0e2fb332 100644 --- a/test/promise/all.js +++ b/test/promise/all.js @@ -1,4 +1,4 @@ -/*global it, describe, expect, assert, Promise */ +/* global it, describe, expect, assert, Promise */ var failIfThrows = function (done) { 'use strict'; @@ -88,7 +88,6 @@ describe('Promise.all', function () { }).then(done, failIfThrows(done)); }); - it('should reject with a TypeError if given a non-iterable', function (done) { var notIterable = {}; @@ -197,4 +196,3 @@ describe('Promise.all', function () { then(done, failIfThrows(done)); }); }); - diff --git a/test/promise/evil-promises.js b/test/promise/evil-promises.js index 14619872..2051d241 100644 --- a/test/promise/evil-promises.js +++ b/test/promise/evil-promises.js @@ -1,4 +1,4 @@ -/*global describe, specify, assert, Promise */ +/* global describe, specify, assert, Promise */ describe('Evil promises should not be able to break invariants', function () { 'use strict'; diff --git a/test/promise/promises-aplus.js b/test/promise/promises-aplus.js index 1a70e913..114c1536 100644 --- a/test/promise/promises-aplus.js +++ b/test/promise/promises-aplus.js @@ -1,4 +1,4 @@ -/*global describe, require, Promise */ +/* global describe, require, Promise */ // tests from promises-aplus-tests diff --git a/test/promise/promises-es6.js b/test/promise/promises-es6.js index 5a4c5957..c0f06350 100644 --- a/test/promise/promises-es6.js +++ b/test/promise/promises-es6.js @@ -1,4 +1,4 @@ -/*global describe, require */ +/* global describe, require */ // tests from promises-es6-tests (function () { diff --git a/test/promise/race.js b/test/promise/race.js index 4d90c6d2..59155f5c 100644 --- a/test/promise/race.js +++ b/test/promise/race.js @@ -1,4 +1,4 @@ -/*global describe, it, expect, setTimeout, assert, Promise */ +/* global describe, it, expect, setTimeout, assert, Promise */ var failIfThrows = function (done) { 'use strict'; diff --git a/test/promise/reject.js b/test/promise/reject.js index 866e470a..a5cb6f0a 100644 --- a/test/promise/reject.js +++ b/test/promise/reject.js @@ -1,4 +1,4 @@ -/*global describe, it, expect, setTimeout, Promise */ +/* global describe, it, expect, setTimeout, Promise */ var failIfThrows = function (done) { 'use strict'; diff --git a/test/promise/resolve.js b/test/promise/resolve.js index c3f2c1ef..c1fe6fa8 100644 --- a/test/promise/resolve.js +++ b/test/promise/resolve.js @@ -1,4 +1,4 @@ -/*global describe, it, expect, setTimeout, Promise */ +/* global describe, it, expect, setTimeout, Promise */ var failIfThrows = function (done) { 'use strict'; diff --git a/test/promise/simple.js b/test/promise/simple.js index 716e5c78..c766a25b 100644 --- a/test/promise/simple.js +++ b/test/promise/simple.js @@ -1,4 +1,4 @@ -/*global describe, specify, assert, Promise */ +/* global describe, specify, assert, Promise */ var failIfThrows = function (done) { 'use strict'; diff --git a/test/promise/subclass.js b/test/promise/subclass.js index 72cb7790..8f4c41a1 100644 --- a/test/promise/subclass.js +++ b/test/promise/subclass.js @@ -1,4 +1,4 @@ -/*global it, describe, assert, Promise */ +/* global it, describe, assert, Promise */ describe('Support user subclassing of Promise', function () { 'use strict'; diff --git a/test/reflect.js b/test/reflect.js index 3fd3d4f7..d8b029b2 100644 --- a/test/reflect.js +++ b/test/reflect.js @@ -1,4 +1,4 @@ -/*global describe, xdescribe, it, xit, expect, require, Reflect */ +/* global describe, xdescribe, it, xit, expect, require, Reflect */ var arePropertyDescriptorsSupported = function () { try { diff --git a/test/regexp.js b/test/regexp.js index a8ae3118..4c236d35 100644 --- a/test/regexp.js +++ b/test/regexp.js @@ -1,4 +1,4 @@ -/*global beforeEach, describe, xdescribe, it, xit, expect, require */ +/* global beforeEach, describe, xdescribe, it, xit, expect, require */ var getRegexLiteral = function (stringRegex) { try { diff --git a/test/string.js b/test/string.js index a1feae5d..6490f625 100644 --- a/test/string.js +++ b/test/string.js @@ -1,4 +1,4 @@ -/*global describe, it, expect, require */ +/* global describe, it, expect, require */ var runStringTests = function () { 'use strict'; @@ -544,11 +544,11 @@ var runStringTests = function () { var callSite = {}; var str = 'The total is 10 ($11 with tax)'; - callSite.raw = {0: 'The total is ', 1: ' ($', 2: ' with tax)', length: 3}; + callSite.raw = { 0: 'The total is ', 1: ' ($', 2: ' with tax)', length: 3 }; expect(String.raw(callSite, 10, 11)).to.eql(str); str = 'The total is {total} (${total * 1.01} with tax)'; - callSite.raw = {0: 'The total is ', 1: ' ($', 2: ' with tax)', length: 3}; + callSite.raw = { 0: 'The total is ', 1: ' ($', 2: ' with tax)', length: 3 }; expect(String.raw(callSite, '{total}', '{total * 1.01}')).to.eql(str); }); diff --git a/test/test_helpers.js b/test/test_helpers.js index 0e2172be..0030701f 100644 --- a/test/test_helpers.js +++ b/test/test_helpers.js @@ -1,4 +1,4 @@ -/*global expect: true, assert: true, require, process */ +/* global expect: true, assert: true, require, process */ expect = (function () { var chai = require('chai'); diff --git a/test/worker-test.js b/test/worker-test.js index 99440c45..e7fd6c8f 100644 --- a/test/worker-test.js +++ b/test/worker-test.js @@ -1,4 +1,4 @@ -/*global describe, it, expect, Worker, location */ +/* global describe, it, expect, Worker, location */ describe('Worker', function () { var workerErrorEventToError = function (errorEvent) {