31d71ac22f
[fixes #522]
23 lines
465 B
JavaScript
23 lines
465 B
JavaScript
getJasmineRequireObj().toBeNaN = function(j$) {
|
|
|
|
function toBeNaN() {
|
|
return {
|
|
compare: function(actual) {
|
|
var result = {
|
|
pass: (actual !== actual)
|
|
};
|
|
|
|
if (result.pass) {
|
|
result.message = 'Expected actual not to be NaN.';
|
|
} else {
|
|
result.message = function() { return 'Expected ' + j$.pp(actual) + ' to be NaN.'; };
|
|
}
|
|
|
|
return result;
|
|
}
|
|
};
|
|
}
|
|
|
|
return toBeNaN;
|
|
};
|