* 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;
/**
* Default timeout interval in milliseconds for waitsFor() blocks.
*/
jasmine.DEFAULT_TIMEOUT_INTERVAL=5000;
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(){
if(this.actual.callCount===0){
// todo: what should the failure message for .not.toHaveBeenCalledWith() be? is this right? test better. [xw]
return[
"Expected spy "+this.actual.identity+" to have been called with "+jasmine.pp(expectedArgs)+" but it was never called.",
"Expected spy "+this.actual.identity+" not to have been called with "+jasmine.pp(expectedArgs)+" but it was."
];
}else{
return[
"Expected spy "+this.actual.identity+" to have been called with "+jasmine.pp(expectedArgs)+" but was called with "+jasmine.pp(this.actual.argsForCall),
"Expected spy "+this.actual.identity+" not to have been called with "+jasmine.pp(expectedArgs)+" but was called with "+jasmine.pp(this.actual.argsForCall)
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.");
g=l[d];g&&!a.depMatched[c]&&!b[d]&&(f[d]?(a.defineDep(c,o[d]),a.check()):u(g,f,b))}),b[e]=!0)}functionw(){vara,f,b,e,m=(b=k.waitSeconds*1E3)&&h.startTime+b<(newDate).getTime(),c=[],g=[],i=!1,j=!0;if(!S){S=!0;A(l,function(b){a=b.map;f=a.id;if(b.enabled&&(a.isDefine||g.push(b),!b.error))if(!b.inited&&m)p(f)?i=e=!0:(c.push(f),d(f));elseif(!b.inited&&b.fetched&&a.isDefine&&(i=!0,!a.prefix))returnj=!1});if(m&&c.length)returnb=G("timeout","Load timeout for modules: "+c,null,c),b.contextName=h.contextName,
a.init&&(b=a.init.apply(W,arguments));returnb||X(a.exports)}},makeRequire:function(a,f){functiond(e,c,i){vark,p;if(f.enableBuildCallback&&c&&D(c))c.__requireJsBuild=!0;if(typeofe==="string"){if(D(c))returnz(G("requireargs","Invalid require call"),i);if(a&&L[e])returnL[e](l[a.id]);if(g.get)returng.get(h,e,a);k=j(e,a,!1,!0);k=k.id;return!F.call(o,k)?z(G("notloaded",'Module name "'+k+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):o[k]}I();h.nextTick(function(){I();p=
d.events;deletel[b]}};returnd},enable:function(a){l[a.id]&&n(a).enable()},completeLoad:function(a){varb,c,d=k.shim[a]||{},g=d.exports;for(s();C.length;){c=C.shift();if(c[0]===null){c[0]=a;if(b)break;b=!0}elsec[0]===a&&(b=!0);y(c)}c=l[a];if(!b&&!o[a]&&c&&!c.inited)if(k.enforceDefine&&(!g||!X(g)))if(p(a))return;elsereturnz(G("nodefine","No define call for "+a,null,[a]));elsey([a,d.deps||[],d.exportsFn]);w()},nameToUrl:function(a,b){varc,d,i,h,j,l;if(g.jsExtRegExp.test(a))h=a+(b||"");else{c=