Matchers & Matchers specs now broken up into individual files. There is now a requireMatchers jasmineRequire function to attach matchers properly.
This commit is contained in:
22
src/core/matchers/toBeNaN.js
Normal file
22
src/core/matchers/toBeNaN.js
Normal file
@@ -0,0 +1,22 @@
|
||||
getJasmineRequireObj().toBeNaN = function() {
|
||||
|
||||
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 = "Expected " + j$.pp(actual) + " to be NaN.";
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return toBeNaN;
|
||||
};
|
||||
Reference in New Issue
Block a user