diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/SpecRunner.html | 2 | ||||
-rw-r--r-- | spec/SpecRunnerEs6.html | 2 | ||||
-rw-r--r-- | spec/spec/types/List.js | 22 |
3 files changed, 14 insertions, 12 deletions
diff --git a/spec/SpecRunner.html b/spec/SpecRunner.html index bd7b59a..15a9c60 100644 --- a/spec/SpecRunner.html +++ b/spec/SpecRunner.html @@ -1,4 +1,4 @@ -<!DOCTYPE html> +<!doctype html> <html> <head> <meta charset="utf-8" /> diff --git a/spec/SpecRunnerEs6.html b/spec/SpecRunnerEs6.html index 05156bd..8caabf5 100644 --- a/spec/SpecRunnerEs6.html +++ b/spec/SpecRunnerEs6.html @@ -1,4 +1,4 @@ -<!DOCTYPE html> +<!doctype html> <html> <head> <meta charset="utf-8" /> diff --git a/spec/spec/types/List.js b/spec/spec/types/List.js index 35c3886..9a44feb 100644 --- a/spec/spec/types/List.js +++ b/spec/spec/types/List.js @@ -77,30 +77,32 @@ describe('List.js', () => { // We're picking a function that we know isn't part of core svg.js // If we implement an 'unshift' function at some point, change this to something else if (List.prototype.hasOwnProperty('unshift')) { - fail('List.unshift is already a function - change this test to use a different name!'); - return; + fail( + 'List.unshift is already a function - change this test to use a different name!' + ) + return } - List.extend([ 'unshift' ]) + List.extend(['unshift']) expect(new List().unshift).toEqual(any(Function)) expect(new List().$unshift).toEqual(Array.prototype.unshift) // Check that it works! const sourceArray = [ - { 'unshift': () => 1 }, - { 'unshift': () => 2 }, - { 'unshift': () => 3 } - ]; + { unshift: () => 1 }, + { unshift: () => 2 }, + { unshift: () => 3 } + ] const list = new List(sourceArray) expect(list).toEqual(sourceArray) - expect(list.unshift(0)).toEqual([1,2,3]) + expect(list.unshift(0)).toEqual([1, 2, 3]) expect(list.$unshift(0)).toEqual(4) expect(list).toEqual([0].concat(sourceArray)) - delete List.prototype.unshift; - }); + delete List.prototype.unshift + }) it('skips reserved names', () => { const { constructor, each, toArray } = List.prototype |