Minor doc fix
This commit is contained in:
+1
-1
@@ -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 Sat Oct 24 2009 17:00:43 GMT-0700 (PDT)
|
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Tue Oct 27 2009 13:32:51 GMT-0700 (PDT)
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
+1
-1
@@ -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 Sat Oct 24 2009 17:00:43 GMT-0700 (PDT)
|
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Tue Oct 27 2009 13:32:51 GMT-0700 (PDT)
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
+33
-10
@@ -384,7 +384,9 @@ ul.inheritsList
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
A function that is called after each spec in a suite.
|
A function that is called after each spec in a suite.
|
||||||
|
|
||||||
|
Used for restoring any state that is hijacked during spec execution.
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<i>Defined in: </i> <a href="../symbols/src/lib_jasmine-0.10.0.js.html">jasmine-0.10.0.js</a>.
|
<i>Defined in: </i> <a href="../symbols/src/lib_jasmine-0.10.0.js.html">jasmine-0.10.0.js</a>.
|
||||||
@@ -423,7 +425,9 @@ ul.inheritsList
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
</div>
|
A function that is called before each spec in a suite.
|
||||||
|
|
||||||
|
Used for spec setup, including validating assumptions.
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<i>Defined in: </i> <a href="../symbols/src/lib_jasmine-0.10.0.js.html">jasmine-0.10.0.js</a>.
|
<i>Defined in: </i> <a href="../symbols/src/lib_jasmine-0.10.0.js.html">jasmine-0.10.0.js</a>.
|
||||||
@@ -462,7 +466,11 @@ ul.inheritsList
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<b>describe</b>(description, specDefinitions)
|
Defines a suite of specifications.
|
||||||
|
|
||||||
|
Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared
|
||||||
|
are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
|
||||||
|
of setup in some tests.
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<i>Defined in: </i> <a href="../symbols/src/lib_jasmine-0.10.0.js.html">jasmine-0.10.0.js</a>.
|
<i>Defined in: </i> <a href="../symbols/src/lib_jasmine-0.10.0.js.html">jasmine-0.10.0.js</a>.
|
||||||
@@ -472,7 +480,9 @@ ul.inheritsList
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<pre class="code">// TODO: a simple suite
|
||||||
|
|
||||||
|
// TODO: a simple suite with a nested describe block</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -511,7 +521,10 @@ ul.inheritsList
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<hr />
|
Starts a chain for a Jasmine expectation.
|
||||||
|
|
||||||
|
It is passed an Object that is the actual value and should chain to one of the many
|
||||||
|
jasmine.Matchers functions.
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<i>Defined in: </i> <a href="../symbols/src/lib_jasmine-0.10.0.js.html">jasmine-0.10.0.js</a>.
|
<i>Defined in: </i> <a href="../symbols/src/lib_jasmine-0.10.0.js.html">jasmine-0.10.0.js</a>.
|
||||||
@@ -550,7 +563,9 @@ ul.inheritsList
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
|
Creates a Jasmine spec that will be added to the current suite.
|
||||||
|
|
||||||
|
// TODO: pending tests
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<i>Defined in: </i> <a href="../symbols/src/lib_jasmine-0.10.0.js.html">jasmine-0.10.0.js</a>.
|
<i>Defined in: </i> <a href="../symbols/src/lib_jasmine-0.10.0.js.html">jasmine-0.10.0.js</a>.
|
||||||
@@ -560,7 +575,9 @@ ul.inheritsList
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<pre class="code">it('should be true', function() {
|
||||||
|
expect(true).toEqual(true);
|
||||||
|
});</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -648,7 +665,11 @@ ul.inheritsList
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="fixedFont">
|
<pre class="code">// spy example
|
||||||
|
var foo = {
|
||||||
|
not: function(bool) { return !bool; }
|
||||||
|
}
|
||||||
|
spyOn(foo, 'not'); // actual foo.not will not be called, execution stops</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -836,7 +857,9 @@ ul.inheritsList
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<dd>function that defines several specs.</dd>
|
Creates a <em>disabled</em> Jasmine spec.
|
||||||
|
|
||||||
|
A convenience method that allows existing specs to be disabled temporarily during development.
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<i>Defined in: </i> <a href="../symbols/src/lib_jasmine-0.10.0.js.html">jasmine-0.10.0.js</a>.
|
<i>Defined in: </i> <a href="../symbols/src/lib_jasmine-0.10.0.js.html">jasmine-0.10.0.js</a>.
|
||||||
@@ -885,7 +908,7 @@ ul.inheritsList
|
|||||||
<!-- ============================== footer ================================= -->
|
<!-- ============================== footer ================================= -->
|
||||||
<div class="fineprint" style="clear:both">
|
<div class="fineprint" style="clear:both">
|
||||||
|
|
||||||
</dl>
|
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 27 2009 13:32:51 GMT-0700 (PDT)
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -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 Sat Oct 24 2009 17:00:43 GMT-0700 (PDT)
|
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 27 2009 13:32:51 GMT-0700 (PDT)
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -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 Sat Oct 24 2009 17:00:43 GMT-0700 (PDT)
|
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 27 2009 13:32:51 GMT-0700 (PDT)
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -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 Sat Oct 24 2009 17:00:43 GMT-0700 (PDT)
|
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 27 2009 13:32:51 GMT-0700 (PDT)
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -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 Sat Oct 24 2009 17:00:43 GMT-0700 (PDT)
|
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 27 2009 13:32:51 GMT-0700 (PDT)
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -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 Sat Oct 24 2009 17:00:43 GMT-0700 (PDT)
|
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 27 2009 13:32:51 GMT-0700 (PDT)
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -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 Sat Oct 24 2009 17:00:43 GMT-0700 (PDT)
|
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 27 2009 13:32:51 GMT-0700 (PDT)
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -327,7 +327,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 Sat Oct 24 2009 17:00:43 GMT-0700 (PDT)
|
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 27 2009 13:32:51 GMT-0700 (PDT)
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -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 Sat Oct 24 2009 17:00:43 GMT-0700 (PDT)
|
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 27 2009 13:32:51 GMT-0700 (PDT)
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -412,15 +412,46 @@ ul.inheritsList
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="description">
|
<div class="description">
|
||||||
Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
|
Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
|
||||||
|
|
||||||
|
Spies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine
|
||||||
|
expectation syntax. Spies can be checked if they were called or not and what the calling params were.
|
||||||
|
|
||||||
|
A Spy has the following mehtod: wasCalled, callCount, mostRecentCall, and argsForCall (see docs)
|
||||||
|
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.
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Spies are torn down at the end of every spec.
|
<pre class="code">// a stub
|
||||||
|
var myStub = jasmine.createSpy('myStub'); // can be used anywhere
|
||||||
|
|
||||||
Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
|
// spy example
|
||||||
|
var foo = {
|
||||||
|
not: function(bool) { return !bool; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// actual foo.not will not be called, execution stops
|
||||||
|
spyOn(foo, 'not');
|
||||||
|
|
||||||
|
// foo.not spied upon, execution will continue to implementation
|
||||||
|
spyOn(foo, 'not').andCallThrough();
|
||||||
|
|
||||||
|
// fake example
|
||||||
|
var foo = {
|
||||||
|
not: function(bool) { return !bool; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// foo.not(val) will return val
|
||||||
|
spyOn(foo, 'not').andCallFake(function(value) {return value;});
|
||||||
|
|
||||||
|
// mock example
|
||||||
|
foo.not(7 == 7);
|
||||||
|
expect(foo.not).wasCalled();
|
||||||
|
expect(foo.not).wasCalledWith(true);</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -475,7 +506,12 @@ ul.inheritsList
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="heading">See:</dt>
|
<pre class="code">var mySpy = jasmine.createSpy('foo');
|
||||||
|
mySpy(1, 2);
|
||||||
|
mySpy(7, 8);
|
||||||
|
mySpy.mostRecentCall.args = [7, 8];
|
||||||
|
mySpy.argsForCall[0] = [1, 2];
|
||||||
|
mySpy.argsForCall[1] = [7, 8];</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -545,7 +581,9 @@ ul.inheritsList
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="fixedFont">
|
<pre class="code">var mySpy = jasmine.createSpy('foo');
|
||||||
|
mySpy(1, 2);
|
||||||
|
mySpy.mostRecentCall.args = [1, 2];</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -579,7 +617,14 @@ ul.inheritsList
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<pre class="code">var baz = function() {
|
||||||
|
// do some stuff, return something
|
||||||
|
}
|
||||||
|
// defining a spy from scratch: foo() calls the function baz
|
||||||
|
var foo = jasmine.createSpy('spy on foo').andCall(baz);
|
||||||
|
|
||||||
|
// defining a spy on an existing property: foo.bar() calls an anonymnous function
|
||||||
|
spyOn(foo, 'bar').andCall(function() { return 'baz';} );</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -619,7 +664,12 @@ ul.inheritsList
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
<pre class="code">var foo = {
|
||||||
|
bar: function() { // do some stuff }
|
||||||
|
}
|
||||||
|
|
||||||
|
// defining a spy on an existing property: foo.bar
|
||||||
|
spyOn(foo, 'bar').andCallThrough();</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -648,7 +698,11 @@ ul.inheritsList
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<pre class="code">// defining a spy from scratch: foo() returns 'baz'
|
||||||
|
var foo = jasmine.createSpy('spy on foo').andReturn('baz');
|
||||||
|
|
||||||
|
// defining a spy on an existing property: foo.bar() returns 'baz'
|
||||||
|
spyOn(foo, 'bar').andReturn('baz');</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -688,7 +742,11 @@ ul.inheritsList
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<pre class="code">// defining a spy from scratch: foo() throws an exception w/ message 'ouch'
|
||||||
|
var foo = jasmine.createSpy('spy on foo').andThrow('baz');
|
||||||
|
|
||||||
|
// defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'
|
||||||
|
spyOn(foo, 'bar').andThrow('baz');</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -753,7 +811,15 @@ ul.inheritsList
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<pre class="code">spyOn(foo, 'bar');
|
||||||
|
|
||||||
|
foo.bar();
|
||||||
|
|
||||||
|
expect(foo.bar.callCount).toEqual(1);
|
||||||
|
|
||||||
|
foo.bar.reset();
|
||||||
|
|
||||||
|
expect(foo.bar.callCount).toEqual(0);</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -779,7 +845,7 @@ ul.inheritsList
|
|||||||
<!-- ============================== footer ================================= -->
|
<!-- ============================== footer ================================= -->
|
||||||
<div class="fineprint" style="clear:both">
|
<div class="fineprint" style="clear:both">
|
||||||
|
|
||||||
The acutal function this spy stubs.
|
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 27 2009 13:32:51 GMT-0700 (PDT)
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -345,7 +345,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 Sat Oct 24 2009 17:00:43 GMT-0700 (PDT)
|
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 27 2009 13:32:51 GMT-0700 (PDT)
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -339,7 +339,8 @@ ul.inheritsList
|
|||||||
<td class="nameDescription">
|
<td class="nameDescription">
|
||||||
<div class="fixedFont">jasmine.<b><a href="../symbols/jasmine.html#.include">include</a></b>(url, opt_global)
|
<div class="fixedFont">jasmine.<b><a href="../symbols/jasmine.html#.include">include</a></b>(url, opt_global)
|
||||||
</div>
|
</div>
|
||||||
<div class="description">Adds suite files to an HTML document so that they are executed, thus adding them to the current
|
<div class="description">Adds suite files to an HTML document so that they are executed, thus adding them to the current
|
||||||
|
Jasmine environment.</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -352,6 +353,15 @@ ul.inheritsList
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="attributes"><static> </td>
|
||||||
|
<td class="nameDescription">
|
||||||
|
<div class="fixedFont">jasmine.<b><a href="../symbols/jasmine.html#.Matchers">Matchers</a></b>(env,, actual, results)
|
||||||
|
</div>
|
||||||
|
<div class="description"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="attributes"><static> </td>
|
<td class="attributes"><static> </td>
|
||||||
<td class="nameDescription">
|
<td class="nameDescription">
|
||||||
@@ -460,7 +470,8 @@ ul.inheritsList
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<pre class="code">// don't care about which function is passed in, as long as it's a function
|
||||||
|
expect(mySpy).wasCalledWith(jasmine.any(Function));</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -500,7 +511,8 @@ ul.inheritsList
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
</div>
|
Creates a more complicated spy: an Object that has every property a function that is a spy. Used for stubbing something
|
||||||
|
large in one call.
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -567,7 +579,8 @@ ul.inheritsList
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
|
Adds suite files to an HTML document so that they are executed, thus adding them to the current
|
||||||
|
Jasmine environment.
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -642,6 +655,54 @@ ul.inheritsList
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<a name=".Matchers"> </a>
|
||||||
|
<div class="fixedFont"><static>
|
||||||
|
|
||||||
|
|
||||||
|
<span class="light">jasmine.</span><b>Matchers</b>(env,, actual, results)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="description">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="detailList">
|
||||||
|
<dt class="heading">Parameters:</dt>
|
||||||
|
|
||||||
|
<dt>
|
||||||
|
<b>env,</b>
|
||||||
|
|
||||||
|
</dt>
|
||||||
|
<dd>actual, results</dd>
|
||||||
|
|
||||||
|
<dt>
|
||||||
|
<b>actual</b>
|
||||||
|
|
||||||
|
</dt>
|
||||||
|
<dd></dd>
|
||||||
|
|
||||||
|
<dt>
|
||||||
|
<b>results</b>
|
||||||
|
|
||||||
|
</dt>
|
||||||
|
<dd></dd>
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<a name=".pp"> </a>
|
<a name=".pp"> </a>
|
||||||
@@ -724,7 +785,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 27 2009 13:32:51 GMT-0700 (PDT)
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -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 Sat Oct 24 2009 17:00:43 GMT-0700 (PDT)
|
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Oct 27 2009 13:32:51 GMT-0700 (PDT)
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
+1166
-1163
File diff suppressed because it is too large
Load Diff
@@ -530,7 +530,7 @@ jasmine.version_= {
|
|||||||
"major": 0,
|
"major": 0,
|
||||||
"minor": 10,
|
"minor": 10,
|
||||||
"build": 0,
|
"build": 0,
|
||||||
"revision": 1256428843
|
"revision": 1256675572
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @namespace
|
* @namespace
|
||||||
@@ -966,6 +966,12 @@ jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){
|
|||||||
return summaryResult;
|
return summaryResult;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @constructor
|
||||||
|
* @param {jasmine.Env} env
|
||||||
|
* @param actual
|
||||||
|
* @param {jasmine.NestedResults} results
|
||||||
|
*/
|
||||||
jasmine.Matchers = function(env, actual, results) {
|
jasmine.Matchers = function(env, actual, results) {
|
||||||
this.env = env;
|
this.env = env;
|
||||||
this.actual = actual;
|
this.actual = actual;
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* @constructor
|
||||||
|
* @param {jasmine.Env} env
|
||||||
|
* @param actual
|
||||||
|
* @param {jasmine.NestedResults} results
|
||||||
|
*/
|
||||||
jasmine.Matchers = function(env, actual, results) {
|
jasmine.Matchers = function(env, actual, results) {
|
||||||
this.env = env;
|
this.env = env;
|
||||||
this.actual = actual;
|
this.actual = actual;
|
||||||
|
|||||||
Reference in New Issue
Block a user