* Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
*
* @namespace
*/
varjasmine={};
if(isCommonJS)exports.jasmine=jasmine;
/**
* @private
*/
jasmine.unimplementedMethod_=function(){
thrownewError("unimplemented method");
};
/**
* Use <code>jasmine.undefined</code> instead of <code>undefined</code>, since <code>undefined</code> is just
* a plain old variable and may be redefined by somebody else.
*
* @private
*/
jasmine.undefined=jasmine.___undefined___;
/**
* Show diagnostic messages in the console if set to true
*
*/
jasmine.VERBOSE=false;
/**
* Default interval in milliseconds for event loop yields (e.g. to allow network activity or to refresh the screen with the HTML-based runner). Small values here may result in slow test running. Zero means no updates until all tests have completed.
*
*/
jasmine.DEFAULT_UPDATE_INTERVAL=250;
/**
* Maximum levels of nesting that will be included when an object is pretty-printed
*/
jasmine.MAX_PRETTY_PRINT_DEPTH=40;
/**
* Default timeout interval in milliseconds for waitsFor() blocks.
*/
jasmine.DEFAULT_TIMEOUT_INTERVAL=5000;
/**
* By default exceptions thrown in the context of a test are caught by jasmine so that it can run the remaining tests in the suite.
* Set to false to let the exception bubble up in the browser.
*
*/
jasmine.CATCH_EXCEPTIONS=true;
jasmine.getGlobal=function(){
functiongetGlobal(){
returnthis;
}
returngetGlobal();
};
/**
* Allows for bound functions to be compared. Internal use only.
*
* @ignore
* @private
* @param base {Object} bound 'this' for the function
mismatchValues.push("'"+property+"' was '"+(b[property]?jasmine.util.htmlEscape(b[property].toString()):b[property])+"' in expected, but was '"+(a[property]?jasmine.util.htmlEscape(a[property].toString()):a[property])+"' in actual.");
thrownewError('Expected a spy, but got '+jasmine.pp(this.actual)+'.');
}
this.message=function(){
varinvertedMessage="Expected spy "+this.actual.identity+" not to have been called with "+jasmine.pp(expectedArgs)+" but it was.";
varpositiveMessage="";
if(this.actual.callCount===0){
positiveMessage="Expected spy "+this.actual.identity+" to have been called with "+jasmine.pp(expectedArgs)+" but it was never called.";
}else{
positiveMessage="Expected spy "+this.actual.identity+" to have been called with "+jasmine.pp(expectedArgs)+" but actual calls were "+jasmine.pp(this.actual.argsForCall).replace(/^\[ | \]$/g,'')
mismatchValues.push("'"+property+"' was '"+(other[property]?jasmine.util.htmlEscape(other[property].toString()):other[property])+"' in expected, but was '"+(this.sample[property]?jasmine.util.htmlEscape(this.sample[property].toString()):this.sample[property])+"' in actual.");