Remove Assertion#equalArray

This commit is contained in:
Tom Payne
2013-04-30 18:22:16 +02:00
parent efccede678
commit 984121e095
2 changed files with 0 additions and 66 deletions
-27
View File
@@ -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.
*