Add Assertion#arreql
Needed because expect.js's eql does not support typed arrays.
This commit is contained in:
@@ -371,6 +371,20 @@
|
|||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the array sort of equals another array.
|
||||||
|
*
|
||||||
|
* @api public
|
||||||
|
*/
|
||||||
|
|
||||||
|
Assertion.prototype.arreql = function (obj) {
|
||||||
|
this.assert(
|
||||||
|
goog.array.equals(this.obj, obj)
|
||||||
|
, function(){ return 'expected ' + i(this.obj) + ' to sort of equal ' + i(obj) }
|
||||||
|
, function(){ return 'expected ' + i(this.obj) + ' to sort of not equal ' + i(obj) });
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the obj sortof equals another.
|
* Checks if the obj sortof equals another.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user