Added toBeNaN matcher
This commit is contained in:
@@ -150,6 +150,17 @@ jasmine.Matchers.prototype.toBeNull = function() {
|
||||
return (this.actual === null);
|
||||
};
|
||||
|
||||
/**
|
||||
* Matcher that compares the actual to NaN.
|
||||
*/
|
||||
jasmine.Matchers.prototype.toBeNaN = function() {
|
||||
this.message = function() {
|
||||
return [ "Expected " + jasmine.pp(this.actual) + " to be NaN." ];
|
||||
};
|
||||
|
||||
return (this.actual !== this.actual);
|
||||
};
|
||||
|
||||
/**
|
||||
* Matcher that boolean not-nots the actual.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user