From 984121e0954f1ed4a9287cde4766e4c5a1aecb12 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Tue, 30 Apr 2013 18:22:16 +0200 Subject: [PATCH] Remove Assertion#equalArray --- test/expect-0.2.0-ol3/expect.js | 27 ----------------------- test/spec/ol/expect.test.js | 39 --------------------------------- 2 files changed, 66 deletions(-) diff --git a/test/expect-0.2.0-ol3/expect.js b/test/expect-0.2.0-ol3/expect.js index 749264a725..562b781aee 100644 --- a/test/expect-0.2.0-ol3/expect.js +++ b/test/expect-0.2.0-ol3/expect.js @@ -492,33 +492,6 @@ return this; }; - /** - * Assert that arrays have the same value. - * - * @param {Array} other - * - * @api public - */ - Assertion.prototype.equalArray = - Assertion.prototype.preferItBeforeItWasFamous = function(other) { - var equal = this.obj.length == other.length; - if (equal) { - var j = 0; - for (j = 0; j < other.length; ++j) { - if (this.obj[j] !== other[j] && - !(isNaN(this.obj[j]) && isNaN(other[j]))) { - equal = false; - break; - } - } - } - this.assert( - equal - , function(){ return 'expected ' + i(this.obj) + ' to have the same array value as ' + i(other) } - , function(){ return 'expected ' + i(this.obj) + ' not to have the same array value as ' + i(other) }); - return this; - }; - /** * Assert a failure. * diff --git a/test/spec/ol/expect.test.js b/test/spec/ol/expect.test.js index 427c861da7..e3f1cab072 100644 --- a/test/spec/ol/expect.test.js +++ b/test/spec/ol/expect.test.js @@ -89,43 +89,4 @@ describe('expect.js', function() { }); - describe('equalArray', function() { - - it('knows who\'s cool', function() { - expect(['me']).to.equalArray(['me']); - }); - - it('knows who isn\'t', function() { - expect(['you']).not.to.equalArray([]); - }); - - }); - - describe('preferItBeforeItWasFamous', function() { - - it('respects the artist\'s privacy', function() { - expect(function() { - expect(['David', 'Bowie']).to.preferItBeforeItWasFamous( - ['David', 'Robert', 'Jones']); - }).to.throwException(); - }); - - it('prefers to keep some things quiet', function() { - expect(function() { - expect(['Cyrus']).to.preferItBeforeItWasFamous(['Cyrus']); - }).not.to.throwException(); - - }); - - }); - - describe('equalArray and preferItBeforeItWasFamous', function() { - - it('should record a duet together \u266c', function() { - expect(expect(['David Bowie']).to.equalArray).to.be( - expect(['Miley Cyrus']).to.preferItBeforeItWasFamous); - }); - - }); - });