Rebuild jasmine.js

This commit is contained in:
ragaskar 2009-10-15 18:00:05 -07:00
parent e9e74f1800
commit 35171c9222
17 changed files with 62 additions and 37 deletions

View File

@ -258,7 +258,7 @@ ul.inheritsList
</div> </div>
<div class="fineprint" style="clear:both"> <div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
</div> </div>
</body> </body>
</html> </html>

View File

@ -300,7 +300,7 @@ ul.inheritsList
</div> </div>
<div class="fineprint" style="clear:both"> <div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
</div> </div>
</body> </body>
</html> </html>

View File

@ -908,7 +908,7 @@ A convenience method that allows existing specs to be disabled temporarily durin
<!-- ============================== footer ================================= --> <!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both"> <div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
</div> </div>
</body> </body>
</html> </html>

View File

@ -339,7 +339,7 @@ ul.inheritsList
<!-- ============================== footer ================================= --> <!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both"> <div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
</div> </div>
</body> </body>
</html> </html>

View File

@ -507,7 +507,7 @@ ul.inheritsList
<!-- ============================== footer ================================= --> <!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both"> <div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
</div> </div>
</body> </body>
</html> </html>

View File

@ -316,7 +316,7 @@ ul.inheritsList
<!-- ============================== footer ================================= --> <!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both"> <div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
</div> </div>
</body> </body>
</html> </html>

View File

@ -316,7 +316,7 @@ ul.inheritsList
<!-- ============================== footer ================================= --> <!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both"> <div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
</div> </div>
</body> </body>
</html> </html>

View File

@ -700,7 +700,7 @@ ul.inheritsList
<!-- ============================== footer ================================= --> <!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both"> <div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
</div> </div>
</body> </body>
</html> </html>

View File

@ -316,7 +316,7 @@ ul.inheritsList
<!-- ============================== footer ================================= --> <!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both"> <div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
</div> </div>
</body> </body>
</html> </html>

View File

@ -418,7 +418,7 @@ ul.inheritsList
<!-- ============================== footer ================================= --> <!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both"> <div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
</div> </div>
</body> </body>
</html> </html>

View File

@ -396,7 +396,7 @@ ul.inheritsList
<!-- ============================== footer ================================= --> <!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both"> <div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
</div> </div>
</body> </body>
</html> </html>

View File

@ -845,7 +845,7 @@ expect(foo.bar.callCount).toEqual(0);</pre>
<!-- ============================== footer ================================= --> <!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both"> <div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
</div> </div>
</body> </body>
</html> </html>

View File

@ -436,7 +436,7 @@ ul.inheritsList
<!-- ============================== footer ================================= --> <!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both"> <div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
</div> </div>
</body> </body>
</html> </html>

View File

@ -728,7 +728,7 @@ Jasmine environment.
<!-- ============================== footer ================================= --> <!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both"> <div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
</div> </div>
</body> </body>
</html> </html>

View File

@ -316,7 +316,7 @@ ul.inheritsList
<!-- ============================== footer ================================= --> <!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both"> <div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 13 2009 15:15:06 GMT-0700 (PDT) Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 15 2009 17:59:44 GMT-0700 (PDT)
</div> </div>
</body> </body>
</html> </html>

View File

@ -529,7 +529,7 @@
<span class='line'>522</span> </span><span class="WHIT"> </span><span class="STRN">"major"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> <span class='line'>522</span> </span><span class="WHIT"> </span><span class="STRN">"major"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>523</span> </span><span class="WHIT"> </span><span class="STRN">"minor"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">9</span><span class="PUNC">,</span><span class="WHIT"> <span class='line'>523</span> </span><span class="WHIT"> </span><span class="STRN">"minor"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">9</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>524</span> </span><span class="WHIT"> </span><span class="STRN">"build"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> <span class='line'>524</span> </span><span class="WHIT"> </span><span class="STRN">"build"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>525</span> </span><span class="WHIT"> </span><span class="STRN">"revision"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">1255470394</span><span class="WHIT"> <span class='line'>525</span> </span><span class="WHIT"> </span><span class="STRN">"revision"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">1255472107</span><span class="WHIT">
<span class='line'>526</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT"> <span class='line'>526</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>527</span> </span><span class="COMM">/** <span class='line'>527</span> </span><span class="COMM">/**
<span class='line'>528</span> * @namespace <span class='line'>528</span> * @namespace

View File

@ -1,6 +1,6 @@
/** /**
* Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework. * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
* *
* @namespace * @namespace
*/ */
var jasmine = {}; var jasmine = {};
@ -14,7 +14,7 @@ jasmine.unimplementedMethod_ = function() {
/** /**
* Large or small values here may result in slow test running & "Too much recursion" errors * Large or small values here may result in slow test running & "Too much recursion" errors
* *
*/ */
jasmine.UPDATE_INTERVAL = 250; jasmine.UPDATE_INTERVAL = 250;
@ -29,7 +29,14 @@ jasmine.UPDATE_INTERVAL = 250;
jasmine.bindOriginal_ = function(base, name) { jasmine.bindOriginal_ = function(base, name) {
var original = base[name]; var original = base[name];
return function() { return function() {
return original.apply(base, arguments); if (original.apply) {
return original.apply(base, arguments);
} else {
//IE support
if (base == window) {
return window[name].apply(window, arguments);
}
}
}; };
}; };
@ -71,10 +78,10 @@ jasmine.getEnv = function() {
*/ */
jasmine.isArray_ = function(value) { jasmine.isArray_ = function(value) {
return value && return value &&
typeof value === 'object' && typeof value === 'object' &&
typeof value.length === 'number' && typeof value.length === 'number' &&
typeof value.splice === 'function' && typeof value.splice === 'function' &&
!(value.propertyIsEnumerable('length')); !(value.propertyIsEnumerable('length'));
}; };
/** /**
@ -123,7 +130,7 @@ jasmine.any = function(clazz) {
* Spies are torn down at the end of every spec. * Spies are torn down at the end of every spec.
* *
* Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj. * Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
* *
* @example * @example
* // a stub * // a stub
* var myStub = jasmine.createSpy('myStub'); // can be used anywhere * var myStub = jasmine.createSpy('myStub'); // can be used anywhere
@ -168,7 +175,8 @@ jasmine.Spy = function(name) {
/** /**
* The acutal function this spy stubs. * The acutal function this spy stubs.
*/ */
this.plan = function() {}; this.plan = function() {
};
/** /**
* Tracking of the most recent call to the spy. * Tracking of the most recent call to the spy.
* @example * @example
@ -199,7 +207,7 @@ jasmine.Spy = function(name) {
* var foo = { * var foo = {
* bar: function() { // do some stuff } * bar: function() { // do some stuff }
* } * }
* *
* // defining a spy on an existing property: foo.bar * // defining a spy on an existing property: foo.bar
* spyOn(foo, 'bar').andCallThrough(); * spyOn(foo, 'bar').andCallThrough();
*/ */
@ -302,11 +310,11 @@ jasmine.createSpy = function(name) {
}; };
var spy = new jasmine.Spy(name); var spy = new jasmine.Spy(name);
for(var prop in spy) { for (var prop in spy) {
spyObj[prop] = spy[prop]; spyObj[prop] = spy[prop];
} }
spyObj.reset(); spyObj.reset();
return spyObj; return spyObj;
@ -410,7 +418,7 @@ var waits = function(timeout) {
/** /**
* Waits for the latchFunction to return true before proceeding to the next runs()-defined block. * Waits for the latchFunction to return true before proceeding to the next runs()-defined block.
* *
* @param {Number} timeout * @param {Number} timeout
* @param {Function} latchFunction * @param {Function} latchFunction
* @param {String} message * @param {String} message
@ -522,7 +530,7 @@ jasmine.version_= {
"major": 0, "major": 0,
"minor": 9, "minor": 9,
"build": 0, "build": 0,
"revision": 1255472107 "revision": 1255654784
}; };
/** /**
* @namespace * @namespace
@ -1412,7 +1420,7 @@ jasmine.PrettyPrinter.prototype.format = function(value) {
jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) { jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) {
for (var property in obj) { for (var property in obj) {
if (property == '__Jasmine_been_here_before__') continue; if (property == '__Jasmine_been_here_before__') continue;
fn(property, obj.__lookupGetter__(property) != null); fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) != null) : false);
} }
}; };
@ -2146,25 +2154,42 @@ jasmine.Clock = {
if (jasmine.Clock.installed != jasmine.Clock.defaultFakeTimer) { if (jasmine.Clock.installed != jasmine.Clock.defaultFakeTimer) {
throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()"); throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()");
} }
}, },
installed: null installed: null
}; };
jasmine.Clock.installed = jasmine.Clock.real; jasmine.Clock.installed = jasmine.Clock.real;
//else for IE support
window.setTimeout = function(funcToCall, millis) { window.setTimeout = function(funcToCall, millis) {
return jasmine.Clock.installed.setTimeout.apply(this, arguments); if (jasmine.Clock.installed.setTimeout.apply) {
return jasmine.Clock.installed.setTimeout.apply(this, arguments);
} else {
return jasmine.Clock.installed.setTimeout(funcToCall, millis);
}
}; };
window.setInterval = function(funcToCall, millis) { window.setInterval = function(funcToCall, millis) {
return jasmine.Clock.installed.setInterval.apply(this, arguments); if (jasmine.Clock.installed.setInterval.apply) {
return jasmine.Clock.installed.setInterval.apply(this, arguments);
} else {
return jasmine.Clock.installed.setInterval(funcToCall, millis);
}
}; };
window.clearTimeout = function(timeoutKey) { window.clearTimeout = function(timeoutKey) {
return jasmine.Clock.installed.clearTimeout.apply(this, arguments); if (jasmine.Clock.installed.clearTimeout.apply) {
return jasmine.Clock.installed.clearTimeout.apply(this, arguments);
} else {
return jasmine.Clock.installed.clearTimeout(timeoutKey);
}
}; };
window.clearInterval = function(timeoutKey) { window.clearInterval = function(timeoutKey) {
return jasmine.Clock.installed.clearInterval.apply(this, arguments); if (jasmine.Clock.installed.clearTimeout.apply) {
return jasmine.Clock.installed.clearInterval.apply(this, arguments);
} else {
return jasmine.Clock.installed.clearInterval(timeoutKey);
}
}; };