Merge branch 'danfinnie-any-vs-anything-error'

This commit is contained in:
Gregg Van Hove
2015-05-18 14:26:57 -07:00
3 changed files with 19 additions and 0 deletions

View File

@@ -2384,6 +2384,12 @@ getJasmineRequireObj().TreeProcessor = function() {
getJasmineRequireObj().Any = function(j$) {
function Any(expectedObject) {
if (typeof expectedObject === 'undefined') {
throw new TypeError(
'jasmine.any() expects to be passed a constructor function. ' +
'Please pass one or use jasmine.anything() to match any object.'
);
}
this.expectedObject = expectedObject;
}