From 82623c439827ea5ae3e01ee1eb988a5c6c92a710 Mon Sep 17 00:00:00 2001 From: Christian Williams Date: Wed, 25 Aug 2010 18:23:19 -0700 Subject: [PATCH] Regenerate docs for 1.0.0RC1. --- downloads/jasmine-standalone-1.0.0RC1.zip | Bin 0 -> 20235 bytes jsdoc/files.html | 4 +- jsdoc/index.html | 10 +- jsdoc/symbols/_global_.html | 39 +- jsdoc/symbols/jasmine.Block.html | 4 +- jsdoc/symbols/jasmine.Clock.html | 4 +- jsdoc/symbols/jasmine.Env.html | 4 +- jsdoc/symbols/jasmine.JsApiReporter.html | 4 +- jsdoc/symbols/jasmine.Matchers.html | 215 ++-- jsdoc/symbols/jasmine.MultiReporter.html | 4 +- jsdoc/symbols/jasmine.NestedResults.html | 4 +- jsdoc/symbols/jasmine.Reporter.html | 4 +- jsdoc/symbols/jasmine.Runner.html | 4 +- jsdoc/symbols/jasmine.Spec.html | 33 +- jsdoc/symbols/jasmine.Spy.html | 4 +- jsdoc/symbols/jasmine.Suite.html | 4 +- jsdoc/symbols/jasmine.WaitsForBlock.html | 437 ++++++++ jsdoc/symbols/jasmine.html | 112 +- jsdoc/symbols/jasmine.util.html | 4 +- jsdoc/symbols/src/src_Env.js.html | 501 ++++----- jsdoc/symbols/src/src_Matchers.js.html | 510 ++++----- jsdoc/symbols/src/src_Queue.js.html | 183 ++-- jsdoc/symbols/src/src_Spec.js.html | 288 ++--- jsdoc/symbols/src/src_WaitsForBlock.js.html | 89 +- jsdoc/symbols/src/src_base.js.html | 1095 ++++++++++--------- 25 files changed, 2068 insertions(+), 1492 deletions(-) create mode 100644 downloads/jasmine-standalone-1.0.0RC1.zip create mode 100644 jsdoc/symbols/jasmine.WaitsForBlock.html diff --git a/downloads/jasmine-standalone-1.0.0RC1.zip b/downloads/jasmine-standalone-1.0.0RC1.zip new file mode 100644 index 0000000000000000000000000000000000000000..49da5d547348a55f155272d273104f46975f1546 GIT binary patch literal 20235 zcmagF1B@;}(cRT4$chXg!>xK5I{g`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am&*R#? z3SFtpRu~=pOn~c)-sMRk^$Fo)=mkxCiWVmp2mr89K9!BfGWYZFpgh)wpk_NeP2n|T zlO0gj=(*2vWfID63?dQ;<(*Ut8F zynN&z3p!aScb3Q?{R4sm)#;Oji9!i%68&Nz`trV*N8l;NsSe2t$^b)J!C<6%O30 zl5D8`DA7?Kb%W>fx-qQL`@9zY1oCQlMYR<-ZJl*(=7>>cf{xLZ8_5{4u%X)B%JMD- z9tbmCBcK^A)>M4wE4v^!n5Cn7RRDXkFD(nWR7Rv#6Zgn*T7K??JYHyw?$=#$!*X=a=f5;X zlFCG7J*9#Pl()V6>*&p%_?rSw!9e$1pcL>*W}_V=6St+MOSkgO_Q$&2+zB5f z=!WZx^QgA2uZFEFJbhtDxDbre7t3lgFm?&t8-Yjf19Bk+8|X4pdZ!WBO#y+{GLwcE zkJUh>t^1DOJv7fej5ecm^_R2l}{0|?waeo(u)oz zp@0~mZR}x^RMsBs1K*1iQ0;jT;|w+{2-Lw>Spd? z@sKYo%a3mvzMl^mM9D%5Qm{#;3lUV_*3Z-_`=u`@#ei-swTW``i~ zSE?%>%42N&SOGIy8~07|72T%z>R-~UUz6AYTS@9)Nz|$UxaD@-A1S6*U~O_KH3zs6 z5%*K>w-tkG1g6xYR4pR<5c6;NR=e zcF>>ala?x<6NZ$@ercH7k$$9;x?OIao|w@lX-o6`GbDBI*@~1rvWfiOiGBs7qp0No Q0OpN9EdW5G3jasmine.util +
  • jasmine.WaitsForBlock
  • +
    @@ -442,7 +444,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:44 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    \ No newline at end of file diff --git a/jsdoc/index.html b/jsdoc/index.html index d506978..7e18bc4 100644 --- a/jsdoc/index.html +++ b/jsdoc/index.html @@ -214,6 +214,8 @@ ul.inheritsList
  • jasmine.util
  • +
  • jasmine.WaitsForBlock
  • +
    @@ -312,11 +314,17 @@ ul.inheritsList
    + +
    +
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:44 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    \ No newline at end of file diff --git a/jsdoc/symbols/_global_.html b/jsdoc/symbols/_global_.html index 7998093..f38f29e 100644 --- a/jsdoc/symbols/_global_.html +++ b/jsdoc/symbols/_global_.html @@ -219,6 +219,8 @@ ul.inheritsList
  • jasmine.util
  • +
  • jasmine.WaitsForBlock
  • +
    @@ -364,16 +366,16 @@ ul.inheritsList
    waits(timeout)
    -
    Waits for a timeout before moving to the next runs()-defined block.
    +
    Waits a fixed time period before moving to the next block.
      -
    waitsFor(timeout, latchFunction, message) +
    waitsFor(latchFunction, optional_timeoutMessage, optional_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 block.
    @@ -930,7 +932,7 @@ spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
    - Waits for a timeout before moving to the next runs()-defined block. + Waits a fixed time period before moving to the next block.
    Defined in: base.js. @@ -948,11 +950,18 @@ spyOn(foo, 'not'); // actual foo.not will not be called, execution stops {Number} timeout -
    +
    milliseconds to wait
    +
    +
    Deprecated:
    +
    + Use waitsFor() instead +
    +
    + @@ -965,11 +974,11 @@ spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
    - waitsFor(timeout, latchFunction, message) + waitsFor(latchFunction, optional_timeoutMessage, optional_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 block.
    Defined in: base.js. @@ -983,12 +992,6 @@ spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
    Parameters:
    -
    - {Number} timeout - -
    -
    -
    {Function} latchFunction @@ -996,7 +999,13 @@ spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
    - {String} message + {String} optional_timeoutMessage + +
    +
    + +
    + {Number} optional_timeout
    @@ -1116,7 +1125,7 @@ A convenience method that allows existing specs to be disabled temporarily durin
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:42 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    diff --git a/jsdoc/symbols/jasmine.Block.html b/jsdoc/symbols/jasmine.Block.html index 6cf50c2..0232a4b 100644 --- a/jsdoc/symbols/jasmine.Block.html +++ b/jsdoc/symbols/jasmine.Block.html @@ -219,6 +219,8 @@ ul.inheritsList
  • jasmine.util
  • +
  • jasmine.WaitsForBlock
  • +
    @@ -411,7 +413,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:42 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    diff --git a/jsdoc/symbols/jasmine.Clock.html b/jsdoc/symbols/jasmine.Clock.html index 3241aa7..fd7463f 100644 --- a/jsdoc/symbols/jasmine.Clock.html +++ b/jsdoc/symbols/jasmine.Clock.html @@ -219,6 +219,8 @@ ul.inheritsList
  • jasmine.util
  • +
  • jasmine.WaitsForBlock
  • +
    @@ -706,7 +708,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:42 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    diff --git a/jsdoc/symbols/jasmine.Env.html b/jsdoc/symbols/jasmine.Env.html index 52c42f6..2fd6300 100644 --- a/jsdoc/symbols/jasmine.Env.html +++ b/jsdoc/symbols/jasmine.Env.html @@ -219,6 +219,8 @@ ul.inheritsList
  • jasmine.util
  • +
  • jasmine.WaitsForBlock
  • +
    @@ -1204,7 +1206,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:43 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    diff --git a/jsdoc/symbols/jasmine.JsApiReporter.html b/jsdoc/symbols/jasmine.JsApiReporter.html index afa2bea..2e8f012 100644 --- a/jsdoc/symbols/jasmine.JsApiReporter.html +++ b/jsdoc/symbols/jasmine.JsApiReporter.html @@ -219,6 +219,8 @@ ul.inheritsList
  • jasmine.util
  • +
  • jasmine.WaitsForBlock
  • +
    @@ -816,7 +818,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:43 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    diff --git a/jsdoc/symbols/jasmine.Matchers.html b/jsdoc/symbols/jasmine.Matchers.html index 97d9708..67c471a 100644 --- a/jsdoc/symbols/jasmine.Matchers.html +++ b/jsdoc/symbols/jasmine.Matchers.html @@ -219,6 +219,8 @@ ul.inheritsList
  • jasmine.util
  • +
  • jasmine.WaitsForBlock
  • +
    @@ -268,6 +270,44 @@ ul.inheritsList + + + + + + + + + + + + + + + + + + + + + + + +
    Field Summary
    Field AttributesField Name and Description
      +
    + wasCalled +
    +
    +
      + +
    +
    + + + + @@ -490,24 +530,6 @@ ul.inheritsList - -   - - -
    - - - - -   - - -
    - - -   @@ -605,6 +627,69 @@ ul.inheritsList +
    + Field Detail +
    + + +
    + + + wasCalled + +
    +
    + + + +
    + + + + +
    +
    Deprecated:
    +
    + Use expect(xxx).toHaveBeenCalled() instead +
    +
    + + + + + +
    + + +
    + + + wasCalledWith + +
    +
    + + + +
    + + + + +
    +
    Deprecated:
    +
    + Use expect(xxx).toHaveBeenCalledWith() instead +
    +
    + + + + + + + + @@ -1223,6 +1308,13 @@ a pattern or a String.
    +
    +
    Deprecated:
    +
    + as of 1.0. Use not.toBe() instead. +
    +
    + @@ -1259,6 +1351,13 @@ a pattern or a String. +
    +
    Deprecated:
    +
    + as of 1.0. Use not.toNotContain() instead. +
    +
    + @@ -1295,6 +1394,13 @@ a pattern or a String. +
    +
    Deprecated:
    +
    + as of 1.0. Use not.toNotEqual() instead. +
    +
    + @@ -1331,6 +1437,13 @@ a pattern or a String. +
    +
    Deprecated:
    +
    + as of 1.0. Use not.toMatch() instead. +
    +
    + @@ -1373,70 +1486,6 @@ a pattern or a String. -
    - - -
    - - - wasCalled() - -
    -
    - - - -
    - - - - - -
    -
    Deprecated:
    -
    - Use expect(xxx).toHaveBeenCalled() instead -
    -
    - - - - - - - -
    - - -
    - - - wasCalledWith() - -
    -
    - - - -
    - - - - - -
    -
    Deprecated:
    -
    - Use expect(xxx).toHaveBeenCalledWith() instead -
    -
    - - - - - - -
    @@ -1557,7 +1606,7 @@ a pattern or a String.
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:43 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    diff --git a/jsdoc/symbols/jasmine.MultiReporter.html b/jsdoc/symbols/jasmine.MultiReporter.html index c40920c..666a4fa 100644 --- a/jsdoc/symbols/jasmine.MultiReporter.html +++ b/jsdoc/symbols/jasmine.MultiReporter.html @@ -219,6 +219,8 @@ ul.inheritsList
  • jasmine.util
  • +
  • jasmine.WaitsForBlock
  • +
    @@ -388,7 +390,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:44 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    diff --git a/jsdoc/symbols/jasmine.NestedResults.html b/jsdoc/symbols/jasmine.NestedResults.html index 4d38756..773d9fb 100644 --- a/jsdoc/symbols/jasmine.NestedResults.html +++ b/jsdoc/symbols/jasmine.NestedResults.html @@ -219,6 +219,8 @@ ul.inheritsList
  • jasmine.util
  • +
  • jasmine.WaitsForBlock
  • +
    @@ -704,7 +706,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:44 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    diff --git a/jsdoc/symbols/jasmine.Reporter.html b/jsdoc/symbols/jasmine.Reporter.html index fcf9d4b..78a5784 100644 --- a/jsdoc/symbols/jasmine.Reporter.html +++ b/jsdoc/symbols/jasmine.Reporter.html @@ -219,6 +219,8 @@ ul.inheritsList
  • jasmine.util
  • +
  • jasmine.WaitsForBlock
  • +
    @@ -613,7 +615,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:44 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    diff --git a/jsdoc/symbols/jasmine.Runner.html b/jsdoc/symbols/jasmine.Runner.html index e7b99b8..5f2e590 100644 --- a/jsdoc/symbols/jasmine.Runner.html +++ b/jsdoc/symbols/jasmine.Runner.html @@ -219,6 +219,8 @@ ul.inheritsList
  • jasmine.util
  • +
  • jasmine.WaitsForBlock
  • +
    @@ -738,7 +740,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:44 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    diff --git a/jsdoc/symbols/jasmine.Spec.html b/jsdoc/symbols/jasmine.Spec.html index f39f5f2..aaf709d 100644 --- a/jsdoc/symbols/jasmine.Spec.html +++ b/jsdoc/symbols/jasmine.Spec.html @@ -219,6 +219,8 @@ ul.inheritsList
  • jasmine.util
  • +
  • jasmine.WaitsForBlock
  • +
    @@ -450,16 +452,16 @@ ul.inheritsList
    waits(timeout)
    -
    +
    Waits a fixed time period before moving to the next block.
      -
    waitsFor(timeout, latchFunction, timeoutMessage) +
    waitsFor(latchFunction, optional_timeoutMessage, optional_timeout)
    -
    +
    Waits for the latchFunction to return true before proceeding to the next block.
    @@ -1116,7 +1118,7 @@ Be careful not to leave calls to jasmine.log in production code.
    - + Waits a fixed time period before moving to the next block.
    @@ -1128,14 +1130,21 @@ Be careful not to leave calls to jasmine.log in production code.
    Parameters:
    - timeout + {Number} timeout
    -
    +
    milliseconds to wait
    +
    +
    Deprecated:
    +
    + Use waitsFor() instead +
    +
    + @@ -1148,11 +1157,11 @@ Be careful not to leave calls to jasmine.log in production code.
    - waitsFor(timeout, latchFunction, timeoutMessage) + waitsFor(latchFunction, optional_timeoutMessage, optional_timeout)
    - + Waits for the latchFunction to return true before proceeding to the next block.
    @@ -1164,19 +1173,19 @@ Be careful not to leave calls to jasmine.log in production code.
    Parameters:
    - timeout + {Function} latchFunction
    - latchFunction + {String} optional_timeoutMessage
    - timeoutMessage + {Number} optional_timeout
    @@ -1204,7 +1213,7 @@ Be careful not to leave calls to jasmine.log in production code.
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:44 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    diff --git a/jsdoc/symbols/jasmine.Spy.html b/jsdoc/symbols/jasmine.Spy.html index 818ed9e..d0d9eb0 100644 --- a/jsdoc/symbols/jasmine.Spy.html +++ b/jsdoc/symbols/jasmine.Spy.html @@ -219,6 +219,8 @@ ul.inheritsList
  • jasmine.util
  • +
  • jasmine.WaitsForBlock
  • +
    @@ -850,7 +852,7 @@ expect(foo.bar.callCount).toEqual(0);
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:44 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    diff --git a/jsdoc/symbols/jasmine.Suite.html b/jsdoc/symbols/jasmine.Suite.html index d177a29..6cb2311 100644 --- a/jsdoc/symbols/jasmine.Suite.html +++ b/jsdoc/symbols/jasmine.Suite.html @@ -219,6 +219,8 @@ ul.inheritsList
  • jasmine.util
  • +
  • jasmine.WaitsForBlock
  • +
    @@ -767,7 +769,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:44 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    diff --git a/jsdoc/symbols/jasmine.WaitsForBlock.html b/jsdoc/symbols/jasmine.WaitsForBlock.html new file mode 100644 index 0000000..7843117 --- /dev/null +++ b/jsdoc/symbols/jasmine.WaitsForBlock.html @@ -0,0 +1,437 @@ + + + + + + + JsDoc Reference - jasmine.WaitsForBlock + + + + + + + + + + + + + +
    + +

    + + Class jasmine.WaitsForBlock +

    + + +

    +
    Extends + jasmine.Block.
    + + + + + +
    Defined in: WaitsForBlock.js. + +

    + + + + + + + + + + + + + + + + + +
    Class Summary
    Constructor AttributesConstructor Name and Description
      +
    + jasmine.WaitsForBlock(env, timeout, latchFunction, message, spec) +
    +
    A block which waits for some condition to become true, with timeout.
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Method Summary
    Method AttributesMethod Name and Description
      +
    execute(onComplete) +
    +
    +
    + + + +
    + +
    + + + + + + + +
    +
    + Class Detail +
    + +
    + jasmine.WaitsForBlock(env, timeout, latchFunction, message, spec) +
    + +
    + A block which waits for some condition to become true, with timeout. + +
    + + + + + +
    +
    Parameters:
    + +
    + {jasmine.Env} env + +
    +
    The Jasmine environment.
    + +
    + {Number} timeout + +
    +
    The maximum time in milliseconds to wait for the condition to become true.
    + +
    + {Function} latchFunction + +
    +
    A function which returns true when the desired condition has been met.
    + +
    + {String} message + +
    +
    The message to display if the desired condition hasn't been met within the given time period.
    + +
    + {jasmine.Spec} spec + +
    +
    The Jasmine spec.
    + +
    + + + + + + + + +
    + + + + + + + +
    + Method Detail +
    + + +
    + + + execute(onComplete) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + onComplete + +
    +
    + +
    + + + + + + + + + + + + + + + +
    +
    + + + +
    + + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT) +
    + + diff --git a/jsdoc/symbols/jasmine.html b/jsdoc/symbols/jasmine.html index 66b739f..0f7bc52 100644 --- a/jsdoc/symbols/jasmine.html +++ b/jsdoc/symbols/jasmine.html @@ -219,6 +219,8 @@ ul.inheritsList
  • jasmine.util
  • +
  • jasmine.WaitsForBlock
  • +
    @@ -280,13 +282,23 @@ ul.inheritsList + + <static>   + + +
    Default timeout interval in milliseconds for waitsFor() blocks.
    + + + <static>   -
    Default interval for event loop yields.
    +
    Default interval in milliseconds for event loop yields (e.g.
    @@ -464,15 +476,6 @@ ul.inheritsList - - <static>   - -
    jasmine.WaitsForBlock(env, timeout, latchFunction, message, spec) -
    -
    - - - @@ -518,6 +521,28 @@ ul.inheritsList Field Detail
    + +
    <static> + + + jasmine.DEFAULT_TIMEOUT_INTERVAL + +
    +
    + Default timeout interval in milliseconds for waitsFor() blocks. + + +
    + + + + + + + + +
    +
    <static> @@ -526,7 +551,7 @@ ul.inheritsList
    - Default interval for event loop yields. Small values here may result in slow test running. Zero means no updates until all tests have completed. + 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.
    @@ -1164,69 +1189,6 @@ Be careful not to leave calls to jasmine.log in production code. -
    - - -
    <static> - - - jasmine.WaitsForBlock(env, timeout, latchFunction, message, spec) - -
    -
    - - -
    - Defined in: WaitsForBlock.js. - - -
    - - - - -
    -
    Parameters:
    - -
    - env - -
    -
    - -
    - timeout - -
    -
    - -
    - latchFunction - -
    -
    - -
    - message - -
    -
    - -
    - spec - -
    -
    - -
    - - - - - - - - @@ -1241,7 +1203,7 @@ Be careful not to leave calls to jasmine.log in production code.
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:42 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    diff --git a/jsdoc/symbols/jasmine.util.html b/jsdoc/symbols/jasmine.util.html index 0526e02..87585a7 100644 --- a/jsdoc/symbols/jasmine.util.html +++ b/jsdoc/symbols/jasmine.util.html @@ -219,6 +219,8 @@ ul.inheritsList
  • jasmine.util
  • +
  • jasmine.WaitsForBlock
  • +
    @@ -529,7 +531,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Fri Jun 25 2010 18:09:44 GMT-0700 (PDT) + Documentation generated by JsDoc Toolkit 2.1.0 on Wed Aug 25 2010 18:21:27 GMT-0700 (PDT)
    diff --git a/jsdoc/symbols/src/src_Env.js.html b/jsdoc/symbols/src/src_Env.js.html index 3d8863c..bdcf2ef 100644 --- a/jsdoc/symbols/src/src_Env.js.html +++ b/jsdoc/symbols/src/src_Env.js.html @@ -18,254 +18,255 @@ 11 this.reporter = new jasmine.MultiReporter(); 12 13 this.updateInterval = jasmine.DEFAULT_UPDATE_INTERVAL; - 14 this.lastUpdate = 0; - 15 this.specFilter = function() { - 16 return true; - 17 }; - 18 - 19 this.nextSpecId_ = 0; - 20 this.nextSuiteId_ = 0; - 21 this.equalityTesters_ = []; - 22 - 23 // wrap matchers - 24 this.matchersClass = function() { - 25 jasmine.Matchers.apply(this, arguments); - 26 }; - 27 jasmine.util.inherit(this.matchersClass, jasmine.Matchers); - 28 - 29 jasmine.Matchers.wrapInto_(jasmine.Matchers.prototype, this.matchersClass); - 30 }; - 31 + 14 this.defaultTimeoutInterval = jasmine.DEFAULT_TIMEOUT_INTERVAL; + 15 this.lastUpdate = 0; + 16 this.specFilter = function() { + 17 return true; + 18 }; + 19 + 20 this.nextSpecId_ = 0; + 21 this.nextSuiteId_ = 0; + 22 this.equalityTesters_ = []; + 23 + 24 // wrap matchers + 25 this.matchersClass = function() { + 26 jasmine.Matchers.apply(this, arguments); + 27 }; + 28 jasmine.util.inherit(this.matchersClass, jasmine.Matchers); + 29 + 30 jasmine.Matchers.wrapInto_(jasmine.Matchers.prototype, this.matchersClass); + 31 }; 32 - 33 jasmine.Env.prototype.setTimeout = jasmine.setTimeout; - 34 jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout; - 35 jasmine.Env.prototype.setInterval = jasmine.setInterval; - 36 jasmine.Env.prototype.clearInterval = jasmine.clearInterval; - 37 - 38 /** - 39 * @returns an object containing jasmine version build info, if set. - 40 */ - 41 jasmine.Env.prototype.version = function () { - 42 if (jasmine.version_) { - 43 return jasmine.version_; - 44 } else { - 45 throw new Error('Version not set'); - 46 } - 47 }; - 48 - 49 /** - 50 * @returns string containing jasmine version build info, if set. - 51 */ - 52 jasmine.Env.prototype.versionString = function() { - 53 if (jasmine.version_) { - 54 var version = this.version(); - 55 return version.major + "." + version.minor + "." + version.build + " revision " + version.revision; - 56 } else { - 57 return "version unknown"; - 58 } - 59 }; - 60 - 61 /** - 62 * @returns a sequential integer starting at 0 - 63 */ - 64 jasmine.Env.prototype.nextSpecId = function () { - 65 return this.nextSpecId_++; - 66 }; - 67 - 68 /** - 69 * @returns a sequential integer starting at 0 - 70 */ - 71 jasmine.Env.prototype.nextSuiteId = function () { - 72 return this.nextSuiteId_++; - 73 }; - 74 - 75 /** - 76 * Register a reporter to receive status updates from Jasmine. - 77 * @param {jasmine.Reporter} reporter An object which will receive status updates. - 78 */ - 79 jasmine.Env.prototype.addReporter = function(reporter) { - 80 this.reporter.addReporter(reporter); - 81 }; - 82 - 83 jasmine.Env.prototype.execute = function() { - 84 this.currentRunner_.execute(); - 85 }; - 86 - 87 jasmine.Env.prototype.describe = function(description, specDefinitions) { - 88 var suite = new jasmine.Suite(this, description, specDefinitions, this.currentSuite); - 89 - 90 var parentSuite = this.currentSuite; - 91 if (parentSuite) { - 92 parentSuite.add(suite); - 93 } else { - 94 this.currentRunner_.add(suite); - 95 } - 96 - 97 this.currentSuite = suite; - 98 - 99 var declarationError = null; -100 try { -101 specDefinitions.call(suite); -102 } catch(e) { -103 declarationError = e; -104 } -105 -106 this.currentSuite = parentSuite; -107 -108 if (declarationError) { -109 this.it("encountered a declaration exception", function() { -110 throw declarationError; -111 }); -112 } -113 -114 return suite; -115 }; -116 -117 jasmine.Env.prototype.beforeEach = function(beforeEachFunction) { -118 if (this.currentSuite) { -119 this.currentSuite.beforeEach(beforeEachFunction); -120 } else { -121 this.currentRunner_.beforeEach(beforeEachFunction); -122 } -123 }; -124 -125 jasmine.Env.prototype.currentRunner = function () { -126 return this.currentRunner_; -127 }; -128 -129 jasmine.Env.prototype.afterEach = function(afterEachFunction) { -130 if (this.currentSuite) { -131 this.currentSuite.afterEach(afterEachFunction); -132 } else { -133 this.currentRunner_.afterEach(afterEachFunction); -134 } -135 -136 }; -137 -138 jasmine.Env.prototype.xdescribe = function(desc, specDefinitions) { -139 return { -140 execute: function() { -141 } -142 }; -143 }; -144 -145 jasmine.Env.prototype.it = function(description, func) { -146 var spec = new jasmine.Spec(this, this.currentSuite, description); -147 this.currentSuite.add(spec); -148 this.currentSpec = spec; -149 -150 if (func) { -151 spec.runs(func); -152 } -153 -154 return spec; -155 }; -156 -157 jasmine.Env.prototype.xit = function(desc, func) { -158 return { -159 id: this.nextSpecId(), -160 runs: function() { -161 } -162 }; -163 }; -164 -165 jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) { -166 if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) { -167 return true; -168 } -169 -170 a.__Jasmine_been_here_before__ = b; -171 b.__Jasmine_been_here_before__ = a; -172 -173 var hasKey = function(obj, keyName) { -174 return obj != null && obj[keyName] !== jasmine.undefined; -175 }; -176 -177 for (var property in b) { -178 if (!hasKey(a, property) && hasKey(b, property)) { -179 mismatchKeys.push("expected has key '" + property + "', but missing from actual."); -180 } -181 } -182 for (property in a) { -183 if (!hasKey(b, property) && hasKey(a, property)) { -184 mismatchKeys.push("expected missing key '" + property + "', but present in actual."); -185 } -186 } -187 for (property in b) { -188 if (property == '__Jasmine_been_here_before__') continue; -189 if (!this.equals_(a[property], b[property], mismatchKeys, mismatchValues)) { -190 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."); -191 } -192 } -193 -194 if (jasmine.isArray_(a) && jasmine.isArray_(b) && a.length != b.length) { -195 mismatchValues.push("arrays were not the same length"); -196 } -197 -198 delete a.__Jasmine_been_here_before__; -199 delete b.__Jasmine_been_here_before__; -200 return (mismatchKeys.length == 0 && mismatchValues.length == 0); -201 }; -202 -203 jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) { -204 mismatchKeys = mismatchKeys || []; -205 mismatchValues = mismatchValues || []; -206 -207 for (var i = 0; i < this.equalityTesters_.length; i++) { -208 var equalityTester = this.equalityTesters_[i]; -209 var result = equalityTester(a, b, this, mismatchKeys, mismatchValues); -210 if (result !== jasmine.undefined) return result; -211 } -212 -213 if (a === b) return true; -214 -215 if (a === jasmine.undefined || a === null || b === jasmine.undefined || b === null) { -216 return (a == jasmine.undefined && b == jasmine.undefined); -217 } -218 -219 if (jasmine.isDomNode(a) && jasmine.isDomNode(b)) { -220 return a === b; -221 } -222 -223 if (a instanceof Date && b instanceof Date) { -224 return a.getTime() == b.getTime(); -225 } -226 -227 if (a instanceof jasmine.Matchers.Any) { -228 return a.matches(b); -229 } -230 -231 if (b instanceof jasmine.Matchers.Any) { -232 return b.matches(a); -233 } -234 -235 if (jasmine.isString_(a) && jasmine.isString_(b)) { -236 return (a == b); -237 } -238 -239 if (jasmine.isNumber_(a) && jasmine.isNumber_(b)) { -240 return (a == b); -241 } -242 -243 if (typeof a === "object" && typeof b === "object") { -244 return this.compareObjects_(a, b, mismatchKeys, mismatchValues); -245 } -246 -247 //Straight check -248 return (a === b); -249 }; -250 -251 jasmine.Env.prototype.contains_ = function(haystack, needle) { -252 if (jasmine.isArray_(haystack)) { -253 for (var i = 0; i < haystack.length; i++) { -254 if (this.equals_(haystack[i], needle)) return true; -255 } -256 return false; -257 } -258 return haystack.indexOf(needle) >= 0; -259 }; -260 -261 jasmine.Env.prototype.addEqualityTester = function(equalityTester) { -262 this.equalityTesters_.push(equalityTester); -263 }; -264 \ No newline at end of file + 33 + 34 jasmine.Env.prototype.setTimeout = jasmine.setTimeout; + 35 jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout; + 36 jasmine.Env.prototype.setInterval = jasmine.setInterval; + 37 jasmine.Env.prototype.clearInterval = jasmine.clearInterval; + 38 + 39 /** + 40 * @returns an object containing jasmine version build info, if set. + 41 */ + 42 jasmine.Env.prototype.version = function () { + 43 if (jasmine.version_) { + 44 return jasmine.version_; + 45 } else { + 46 throw new Error('Version not set'); + 47 } + 48 }; + 49 + 50 /** + 51 * @returns string containing jasmine version build info, if set. + 52 */ + 53 jasmine.Env.prototype.versionString = function() { + 54 if (jasmine.version_) { + 55 var version = this.version(); + 56 return version.major + "." + version.minor + "." + version.build + " revision " + version.revision; + 57 } else { + 58 return "version unknown"; + 59 } + 60 }; + 61 + 62 /** + 63 * @returns a sequential integer starting at 0 + 64 */ + 65 jasmine.Env.prototype.nextSpecId = function () { + 66 return this.nextSpecId_++; + 67 }; + 68 + 69 /** + 70 * @returns a sequential integer starting at 0 + 71 */ + 72 jasmine.Env.prototype.nextSuiteId = function () { + 73 return this.nextSuiteId_++; + 74 }; + 75 + 76 /** + 77 * Register a reporter to receive status updates from Jasmine. + 78 * @param {jasmine.Reporter} reporter An object which will receive status updates. + 79 */ + 80 jasmine.Env.prototype.addReporter = function(reporter) { + 81 this.reporter.addReporter(reporter); + 82 }; + 83 + 84 jasmine.Env.prototype.execute = function() { + 85 this.currentRunner_.execute(); + 86 }; + 87 + 88 jasmine.Env.prototype.describe = function(description, specDefinitions) { + 89 var suite = new jasmine.Suite(this, description, specDefinitions, this.currentSuite); + 90 + 91 var parentSuite = this.currentSuite; + 92 if (parentSuite) { + 93 parentSuite.add(suite); + 94 } else { + 95 this.currentRunner_.add(suite); + 96 } + 97 + 98 this.currentSuite = suite; + 99 +100 var declarationError = null; +101 try { +102 specDefinitions.call(suite); +103 } catch(e) { +104 declarationError = e; +105 } +106 +107 this.currentSuite = parentSuite; +108 +109 if (declarationError) { +110 this.it("encountered a declaration exception", function() { +111 throw declarationError; +112 }); +113 } +114 +115 return suite; +116 }; +117 +118 jasmine.Env.prototype.beforeEach = function(beforeEachFunction) { +119 if (this.currentSuite) { +120 this.currentSuite.beforeEach(beforeEachFunction); +121 } else { +122 this.currentRunner_.beforeEach(beforeEachFunction); +123 } +124 }; +125 +126 jasmine.Env.prototype.currentRunner = function () { +127 return this.currentRunner_; +128 }; +129 +130 jasmine.Env.prototype.afterEach = function(afterEachFunction) { +131 if (this.currentSuite) { +132 this.currentSuite.afterEach(afterEachFunction); +133 } else { +134 this.currentRunner_.afterEach(afterEachFunction); +135 } +136 +137 }; +138 +139 jasmine.Env.prototype.xdescribe = function(desc, specDefinitions) { +140 return { +141 execute: function() { +142 } +143 }; +144 }; +145 +146 jasmine.Env.prototype.it = function(description, func) { +147 var spec = new jasmine.Spec(this, this.currentSuite, description); +148 this.currentSuite.add(spec); +149 this.currentSpec = spec; +150 +151 if (func) { +152 spec.runs(func); +153 } +154 +155 return spec; +156 }; +157 +158 jasmine.Env.prototype.xit = function(desc, func) { +159 return { +160 id: this.nextSpecId(), +161 runs: function() { +162 } +163 }; +164 }; +165 +166 jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) { +167 if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) { +168 return true; +169 } +170 +171 a.__Jasmine_been_here_before__ = b; +172 b.__Jasmine_been_here_before__ = a; +173 +174 var hasKey = function(obj, keyName) { +175 return obj != null && obj[keyName] !== jasmine.undefined; +176 }; +177 +178 for (var property in b) { +179 if (!hasKey(a, property) && hasKey(b, property)) { +180 mismatchKeys.push("expected has key '" + property + "', but missing from actual."); +181 } +182 } +183 for (property in a) { +184 if (!hasKey(b, property) && hasKey(a, property)) { +185 mismatchKeys.push("expected missing key '" + property + "', but present in actual."); +186 } +187 } +188 for (property in b) { +189 if (property == '__Jasmine_been_here_before__') continue; +190 if (!this.equals_(a[property], b[property], mismatchKeys, mismatchValues)) { +191 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."); +192 } +193 } +194 +195 if (jasmine.isArray_(a) && jasmine.isArray_(b) && a.length != b.length) { +196 mismatchValues.push("arrays were not the same length"); +197 } +198 +199 delete a.__Jasmine_been_here_before__; +200 delete b.__Jasmine_been_here_before__; +201 return (mismatchKeys.length == 0 && mismatchValues.length == 0); +202 }; +203 +204 jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) { +205 mismatchKeys = mismatchKeys || []; +206 mismatchValues = mismatchValues || []; +207 +208 for (var i = 0; i < this.equalityTesters_.length; i++) { +209 var equalityTester = this.equalityTesters_[i]; +210 var result = equalityTester(a, b, this, mismatchKeys, mismatchValues); +211 if (result !== jasmine.undefined) return result; +212 } +213 +214 if (a === b) return true; +215 +216 if (a === jasmine.undefined || a === null || b === jasmine.undefined || b === null) { +217 return (a == jasmine.undefined && b == jasmine.undefined); +218 } +219 +220 if (jasmine.isDomNode(a) && jasmine.isDomNode(b)) { +221 return a === b; +222 } +223 +224 if (a instanceof Date && b instanceof Date) { +225 return a.getTime() == b.getTime(); +226 } +227 +228 if (a instanceof jasmine.Matchers.Any) { +229 return a.matches(b); +230 } +231 +232 if (b instanceof jasmine.Matchers.Any) { +233 return b.matches(a); +234 } +235 +236 if (jasmine.isString_(a) && jasmine.isString_(b)) { +237 return (a == b); +238 } +239 +240 if (jasmine.isNumber_(a) && jasmine.isNumber_(b)) { +241 return (a == b); +242 } +243 +244 if (typeof a === "object" && typeof b === "object") { +245 return this.compareObjects_(a, b, mismatchKeys, mismatchValues); +246 } +247 +248 //Straight check +249 return (a === b); +250 }; +251 +252 jasmine.Env.prototype.contains_ = function(haystack, needle) { +253 if (jasmine.isArray_(haystack)) { +254 for (var i = 0; i < haystack.length; i++) { +255 if (this.equals_(haystack[i], needle)) return true; +256 } +257 return false; +258 } +259 return haystack.indexOf(needle) >= 0; +260 }; +261 +262 jasmine.Env.prototype.addEqualityTester = function(equalityTester) { +263 this.equalityTesters_.push(equalityTester); +264 }; +265 \ No newline at end of file diff --git a/jsdoc/symbols/src/src_Matchers.js.html b/jsdoc/symbols/src/src_Matchers.js.html index 62d2fd7..ab3d5fb 100644 --- a/jsdoc/symbols/src/src_Matchers.js.html +++ b/jsdoc/symbols/src/src_Matchers.js.html @@ -75,7 +75,7 @@ 68 message: message 69 }); 70 this.spec.addMatcherResult(expectationResult); - 71 return result; + 71 return jasmine.undefined; 72 }; 73 }; 74 @@ -93,252 +93,270 @@ 86 /** 87 * toNotBe: compares the actual to the expected using !== 88 * @param expected - 89 */ - 90 jasmine.Matchers.prototype.toNotBe = function(expected) { - 91 return this.actual !== expected; - 92 }; - 93 - 94 /** - 95 * toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc. - 96 * - 97 * @param expected - 98 */ - 99 jasmine.Matchers.prototype.toEqual = function(expected) { -100 return this.env.equals_(this.actual, expected); -101 }; -102 -103 /** -104 * toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual -105 * @param expected -106 */ -107 jasmine.Matchers.prototype.toNotEqual = function(expected) { -108 return !this.env.equals_(this.actual, expected); -109 }; -110 -111 /** -112 * Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes -113 * a pattern or a String. -114 * -115 * @param expected -116 */ -117 jasmine.Matchers.prototype.toMatch = function(expected) { -118 return new RegExp(expected).test(this.actual); -119 }; -120 -121 /** -122 * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch -123 * @param expected -124 */ -125 jasmine.Matchers.prototype.toNotMatch = function(expected) { -126 return !(new RegExp(expected).test(this.actual)); -127 }; -128 -129 /** -130 * Matcher that compares the actual to jasmine.undefined. -131 */ -132 jasmine.Matchers.prototype.toBeDefined = function() { -133 return (this.actual !== jasmine.undefined); -134 }; -135 -136 /** -137 * Matcher that compares the actual to jasmine.undefined. -138 */ -139 jasmine.Matchers.prototype.toBeUndefined = function() { -140 return (this.actual === jasmine.undefined); -141 }; -142 -143 /** -144 * Matcher that compares the actual to null. -145 */ -146 jasmine.Matchers.prototype.toBeNull = function() { -147 return (this.actual === null); -148 }; -149 -150 /** -151 * Matcher that boolean not-nots the actual. -152 */ -153 jasmine.Matchers.prototype.toBeTruthy = function() { -154 return !!this.actual; -155 }; -156 -157 -158 /** -159 * Matcher that boolean nots the actual. -160 */ -161 jasmine.Matchers.prototype.toBeFalsy = function() { -162 return !this.actual; -163 }; -164 -165 -166 /** @deprecated Use expect(xxx).toHaveBeenCalled() instead */ -167 jasmine.Matchers.prototype.wasCalled = function() { -168 return this.toHaveBeenCalled(); -169 }; -170 -171 /** -172 * Matcher that checks to see if the actual, a Jasmine spy, was called. -173 */ -174 jasmine.Matchers.prototype.toHaveBeenCalled = function() { -175 if (arguments.length > 0) { -176 throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith'); -177 } -178 -179 if (!jasmine.isSpy(this.actual)) { -180 throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); -181 } -182 -183 this.message = function() { -184 return "Expected spy " + this.actual.identity + " to have been called."; -185 }; -186 -187 return this.actual.wasCalled; -188 }; -189 -190 /** -191 * Matcher that checks to see if the actual, a Jasmine spy, was not called. -192 * -193 * @deprecated Use expect(xxx).not.toHaveBeenCalled() instead -194 */ -195 jasmine.Matchers.prototype.wasNotCalled = function() { -196 if (arguments.length > 0) { -197 throw new Error('wasNotCalled does not take arguments'); -198 } -199 -200 if (!jasmine.isSpy(this.actual)) { -201 throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); + 89 * @deprecated as of 1.0. Use not.toBe() instead. + 90 */ + 91 jasmine.Matchers.prototype.toNotBe = function(expected) { + 92 return this.actual !== expected; + 93 }; + 94 + 95 /** + 96 * toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc. + 97 * + 98 * @param expected + 99 */ +100 jasmine.Matchers.prototype.toEqual = function(expected) { +101 return this.env.equals_(this.actual, expected); +102 }; +103 +104 /** +105 * toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual +106 * @param expected +107 * @deprecated as of 1.0. Use not.toNotEqual() instead. +108 */ +109 jasmine.Matchers.prototype.toNotEqual = function(expected) { +110 return !this.env.equals_(this.actual, expected); +111 }; +112 +113 /** +114 * Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes +115 * a pattern or a String. +116 * +117 * @param expected +118 */ +119 jasmine.Matchers.prototype.toMatch = function(expected) { +120 return new RegExp(expected).test(this.actual); +121 }; +122 +123 /** +124 * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch +125 * @param expected +126 * @deprecated as of 1.0. Use not.toMatch() instead. +127 */ +128 jasmine.Matchers.prototype.toNotMatch = function(expected) { +129 return !(new RegExp(expected).test(this.actual)); +130 }; +131 +132 /** +133 * Matcher that compares the actual to jasmine.undefined. +134 */ +135 jasmine.Matchers.prototype.toBeDefined = function() { +136 return (this.actual !== jasmine.undefined); +137 }; +138 +139 /** +140 * Matcher that compares the actual to jasmine.undefined. +141 */ +142 jasmine.Matchers.prototype.toBeUndefined = function() { +143 return (this.actual === jasmine.undefined); +144 }; +145 +146 /** +147 * Matcher that compares the actual to null. +148 */ +149 jasmine.Matchers.prototype.toBeNull = function() { +150 return (this.actual === null); +151 }; +152 +153 /** +154 * Matcher that boolean not-nots the actual. +155 */ +156 jasmine.Matchers.prototype.toBeTruthy = function() { +157 return !!this.actual; +158 }; +159 +160 +161 /** +162 * Matcher that boolean nots the actual. +163 */ +164 jasmine.Matchers.prototype.toBeFalsy = function() { +165 return !this.actual; +166 }; +167 +168 +169 /** +170 * Matcher that checks to see if the actual, a Jasmine spy, was called. +171 */ +172 jasmine.Matchers.prototype.toHaveBeenCalled = function() { +173 if (arguments.length > 0) { +174 throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith'); +175 } +176 +177 if (!jasmine.isSpy(this.actual)) { +178 throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); +179 } +180 +181 this.message = function() { +182 return [ +183 "Expected spy " + this.actual.identity + " to have been called.", +184 "Expected spy " + this.actual.identity + " not to have been called." +185 ]; +186 }; +187 +188 return this.actual.wasCalled; +189 }; +190 +191 /** @deprecated Use expect(xxx).toHaveBeenCalled() instead */ +192 jasmine.Matchers.prototype.wasCalled = jasmine.Matchers.prototype.toHaveBeenCalled; +193 +194 /** +195 * Matcher that checks to see if the actual, a Jasmine spy, was not called. +196 * +197 * @deprecated Use expect(xxx).not.toHaveBeenCalled() instead +198 */ +199 jasmine.Matchers.prototype.wasNotCalled = function() { +200 if (arguments.length > 0) { +201 throw new Error('wasNotCalled does not take arguments'); 202 } 203 -204 this.message = function() { -205 return "Expected spy " + this.actual.identity + " to not have been called."; -206 }; +204 if (!jasmine.isSpy(this.actual)) { +205 throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); +206 } 207 -208 return !this.actual.wasCalled; -209 }; -210 -211 /** @deprecated Use expect(xxx).toHaveBeenCalledWith() instead */ -212 jasmine.Matchers.prototype.wasCalledWith = function() { -213 return this.toHaveBeenCalledWith.apply(this, arguments); -214 }; -215 -216 /** -217 * Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters. -218 * -219 * @example +208 this.message = function() { +209 return [ +210 "Expected spy " + this.actual.identity + " to not have been called.", +211 "Expected spy " + this.actual.identity + " to have been called." +212 ]; +213 }; +214 +215 return !this.actual.wasCalled; +216 }; +217 +218 /** +219 * Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters. 220 * -221 */ -222 jasmine.Matchers.prototype.toHaveBeenCalledWith = function() { -223 var expectedArgs = jasmine.util.argsToArray(arguments); -224 if (!jasmine.isSpy(this.actual)) { -225 throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); -226 } -227 this.message = function() { -228 if (this.actual.callCount == 0) { -229 return "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but it was never called."; -230 } else { -231 return "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall); -232 } -233 }; -234 -235 return this.env.contains_(this.actual.argsForCall, expectedArgs); -236 }; -237 -238 /** @deprecated Use expect(xxx).not.toHaveBeenCalledWith() instead */ -239 jasmine.Matchers.prototype.wasNotCalledWith = function() { -240 var expectedArgs = jasmine.util.argsToArray(arguments); -241 if (!jasmine.isSpy(this.actual)) { -242 throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); -243 } -244 -245 this.message = function() { -246 return "Expected spy not to have been called with " + jasmine.pp(expectedArgs) + " but it was"; -247 }; -248 -249 return !this.env.contains_(this.actual.argsForCall, expectedArgs); -250 }; -251 -252 /** -253 * Matcher that checks that the expected item is an element in the actual Array. -254 * -255 * @param {Object} expected -256 */ -257 jasmine.Matchers.prototype.toContain = function(expected) { -258 return this.env.contains_(this.actual, expected); -259 }; -260 -261 /** -262 * Matcher that checks that the expected item is NOT an element in the actual Array. -263 * -264 * @param {Object} expected -265 */ -266 jasmine.Matchers.prototype.toNotContain = function(expected) { -267 return !this.env.contains_(this.actual, expected); -268 }; -269 -270 jasmine.Matchers.prototype.toBeLessThan = function(expected) { -271 return this.actual < expected; -272 }; -273 -274 jasmine.Matchers.prototype.toBeGreaterThan = function(expected) { -275 return this.actual > expected; -276 }; -277 -278 /** -279 * Matcher that checks that the expected exception was thrown by the actual. -280 * -281 * @param {String} expected -282 */ -283 jasmine.Matchers.prototype.toThrow = function(expected) { -284 var result = false; -285 var exception; -286 if (typeof this.actual != 'function') { -287 throw new Error('Actual is not a function'); -288 } -289 try { -290 this.actual(); -291 } catch (e) { -292 exception = e; -293 } -294 if (exception) { -295 result = (expected === jasmine.undefined || this.env.equals_(exception.message || exception, expected.message || expected)); -296 } -297 -298 this.message = function() { -299 if (exception && (expected === jasmine.undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) { -300 return ["Expected function to throw", expected.message || expected, ", but it threw", exception.message || exception].join(' '); -301 } else { -302 return "Expected function to throw an exception."; -303 } -304 }; -305 -306 return result; -307 }; -308 -309 jasmine.Matchers.Any = function(expectedClass) { -310 this.expectedClass = expectedClass; -311 }; -312 -313 jasmine.Matchers.Any.prototype.matches = function(other) { -314 if (this.expectedClass == String) { -315 return typeof other == 'string' || other instanceof String; -316 } -317 -318 if (this.expectedClass == Number) { -319 return typeof other == 'number' || other instanceof Number; -320 } -321 -322 if (this.expectedClass == Function) { -323 return typeof other == 'function' || other instanceof Function; -324 } -325 -326 if (this.expectedClass == Object) { -327 return typeof other == 'object'; -328 } -329 -330 return other instanceof this.expectedClass; -331 }; -332 -333 jasmine.Matchers.Any.prototype.toString = function() { -334 return '<jasmine.any(' + this.expectedClass + ')>'; -335 }; -336 -337 \ No newline at end of file +221 * @example +222 * +223 */ +224 jasmine.Matchers.prototype.toHaveBeenCalledWith = function() { +225 var expectedArgs = jasmine.util.argsToArray(arguments); +226 if (!jasmine.isSpy(this.actual)) { +227 throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); +228 } +229 this.message = function() { +230 if (this.actual.callCount == 0) { +231 // todo: what should the failure message for .not.toHaveBeenCalledWith() be? is this right? test better. [xw] +232 return [ +233 "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but it was never called.", +234 "Expected spy not to have been called with " + jasmine.pp(expectedArgs) + " but it was." +235 ]; +236 } else { +237 return [ +238 "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall), +239 "Expected spy not to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall) +240 ]; +241 } +242 }; +243 +244 return this.env.contains_(this.actual.argsForCall, expectedArgs); +245 }; +246 +247 /** @deprecated Use expect(xxx).toHaveBeenCalledWith() instead */ +248 jasmine.Matchers.prototype.wasCalledWith = jasmine.Matchers.prototype.toHaveBeenCalledWith; +249 +250 /** @deprecated Use expect(xxx).not.toHaveBeenCalledWith() instead */ +251 jasmine.Matchers.prototype.wasNotCalledWith = function() { +252 var expectedArgs = jasmine.util.argsToArray(arguments); +253 if (!jasmine.isSpy(this.actual)) { +254 throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); +255 } +256 +257 this.message = function() { +258 return [ +259 "Expected spy not to have been called with " + jasmine.pp(expectedArgs) + " but it was", +260 "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but it was" +261 ] +262 }; +263 +264 return !this.env.contains_(this.actual.argsForCall, expectedArgs); +265 }; +266 +267 /** +268 * Matcher that checks that the expected item is an element in the actual Array. +269 * +270 * @param {Object} expected +271 */ +272 jasmine.Matchers.prototype.toContain = function(expected) { +273 return this.env.contains_(this.actual, expected); +274 }; +275 +276 /** +277 * Matcher that checks that the expected item is NOT an element in the actual Array. +278 * +279 * @param {Object} expected +280 * @deprecated as of 1.0. Use not.toNotContain() instead. +281 */ +282 jasmine.Matchers.prototype.toNotContain = function(expected) { +283 return !this.env.contains_(this.actual, expected); +284 }; +285 +286 jasmine.Matchers.prototype.toBeLessThan = function(expected) { +287 return this.actual < expected; +288 }; +289 +290 jasmine.Matchers.prototype.toBeGreaterThan = function(expected) { +291 return this.actual > expected; +292 }; +293 +294 /** +295 * Matcher that checks that the expected exception was thrown by the actual. +296 * +297 * @param {String} expected +298 */ +299 jasmine.Matchers.prototype.toThrow = function(expected) { +300 var result = false; +301 var exception; +302 if (typeof this.actual != 'function') { +303 throw new Error('Actual is not a function'); +304 } +305 try { +306 this.actual(); +307 } catch (e) { +308 exception = e; +309 } +310 if (exception) { +311 result = (expected === jasmine.undefined || this.env.equals_(exception.message || exception, expected.message || expected)); +312 } +313 +314 var not = this.isNot ? "not " : ""; +315 +316 this.message = function() { +317 if (exception && (expected === jasmine.undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) { +318 return ["Expected function " + not + "to throw", expected ? expected.message || expected : " an exception", ", but it threw", exception.message || exception].join(' '); +319 } else { +320 return "Expected function to throw an exception."; +321 } +322 }; +323 +324 return result; +325 }; +326 +327 jasmine.Matchers.Any = function(expectedClass) { +328 this.expectedClass = expectedClass; +329 }; +330 +331 jasmine.Matchers.Any.prototype.matches = function(other) { +332 if (this.expectedClass == String) { +333 return typeof other == 'string' || other instanceof String; +334 } +335 +336 if (this.expectedClass == Number) { +337 return typeof other == 'number' || other instanceof Number; +338 } +339 +340 if (this.expectedClass == Function) { +341 return typeof other == 'function' || other instanceof Function; +342 } +343 +344 if (this.expectedClass == Object) { +345 return typeof other == 'object'; +346 } +347 +348 return other instanceof this.expectedClass; +349 }; +350 +351 jasmine.Matchers.Any.prototype.toString = function() { +352 return '<jasmine.any(' + this.expectedClass + ')>'; +353 }; +354 +355 \ No newline at end of file diff --git a/jsdoc/symbols/src/src_Queue.js.html b/jsdoc/symbols/src/src_Queue.js.html index fc81c10..3e798fc 100644 --- a/jsdoc/symbols/src/src_Queue.js.html +++ b/jsdoc/symbols/src/src_Queue.js.html @@ -11,92 +11,97 @@ 4 this.running = false; 5 this.index = 0; 6 this.offset = 0; - 7 }; - 8 - 9 jasmine.Queue.prototype.addBefore = function(block) { - 10 this.blocks.unshift(block); - 11 }; - 12 - 13 jasmine.Queue.prototype.add = function(block) { - 14 this.blocks.push(block); - 15 }; - 16 - 17 jasmine.Queue.prototype.insertNext = function(block) { - 18 this.blocks.splice((this.index + this.offset + 1), 0, block); - 19 this.offset++; - 20 }; - 21 - 22 jasmine.Queue.prototype.start = function(onComplete) { - 23 this.running = true; - 24 this.onComplete = onComplete; - 25 this.next_(); - 26 }; - 27 - 28 jasmine.Queue.prototype.isRunning = function() { - 29 return this.running; - 30 }; - 31 - 32 jasmine.Queue.LOOP_DONT_RECURSE = true; - 33 - 34 jasmine.Queue.prototype.next_ = function() { - 35 var self = this; - 36 var goAgain = true; - 37 - 38 while (goAgain) { - 39 goAgain = false; - 40 - 41 if (self.index < self.blocks.length) { - 42 var calledSynchronously = true; - 43 var completedSynchronously = false; - 44 - 45 var onComplete = function () { - 46 if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) { - 47 completedSynchronously = true; - 48 return; - 49 } - 50 - 51 self.offset = 0; - 52 self.index++; - 53 - 54 var now = new Date().getTime(); - 55 if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) { - 56 self.env.lastUpdate = now; - 57 self.env.setTimeout(function() { - 58 self.next_(); - 59 }, 0); - 60 } else { - 61 if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) { - 62 goAgain = true; - 63 } else { - 64 self.next_(); - 65 } - 66 } - 67 }; - 68 self.blocks[self.index].execute(onComplete); - 69 - 70 calledSynchronously = false; - 71 if (completedSynchronously) { - 72 onComplete(); - 73 } - 74 - 75 } else { - 76 self.running = false; - 77 if (self.onComplete) { - 78 self.onComplete(); - 79 } - 80 } - 81 } - 82 }; - 83 - 84 jasmine.Queue.prototype.results = function() { - 85 var results = new jasmine.NestedResults(); - 86 for (var i = 0; i < this.blocks.length; i++) { - 87 if (this.blocks[i].results) { - 88 results.addResult(this.blocks[i].results()); - 89 } - 90 } - 91 return results; - 92 }; - 93 - 94 - 95 \ No newline at end of file + 7 this.abort = false; + 8 }; + 9 + 10 jasmine.Queue.prototype.addBefore = function(block) { + 11 this.blocks.unshift(block); + 12 }; + 13 + 14 jasmine.Queue.prototype.add = function(block) { + 15 this.blocks.push(block); + 16 }; + 17 + 18 jasmine.Queue.prototype.insertNext = function(block) { + 19 this.blocks.splice((this.index + this.offset + 1), 0, block); + 20 this.offset++; + 21 }; + 22 + 23 jasmine.Queue.prototype.start = function(onComplete) { + 24 this.running = true; + 25 this.onComplete = onComplete; + 26 this.next_(); + 27 }; + 28 + 29 jasmine.Queue.prototype.isRunning = function() { + 30 return this.running; + 31 }; + 32 + 33 jasmine.Queue.LOOP_DONT_RECURSE = true; + 34 + 35 jasmine.Queue.prototype.next_ = function() { + 36 var self = this; + 37 var goAgain = true; + 38 + 39 while (goAgain) { + 40 goAgain = false; + 41 + 42 if (self.index < self.blocks.length && !this.abort) { + 43 var calledSynchronously = true; + 44 var completedSynchronously = false; + 45 + 46 var onComplete = function () { + 47 if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) { + 48 completedSynchronously = true; + 49 return; + 50 } + 51 + 52 if (self.blocks[self.index].abort) { + 53 self.abort = true; + 54 } + 55 + 56 self.offset = 0; + 57 self.index++; + 58 + 59 var now = new Date().getTime(); + 60 if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) { + 61 self.env.lastUpdate = now; + 62 self.env.setTimeout(function() { + 63 self.next_(); + 64 }, 0); + 65 } else { + 66 if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) { + 67 goAgain = true; + 68 } else { + 69 self.next_(); + 70 } + 71 } + 72 }; + 73 self.blocks[self.index].execute(onComplete); + 74 + 75 calledSynchronously = false; + 76 if (completedSynchronously) { + 77 onComplete(); + 78 } + 79 + 80 } else { + 81 self.running = false; + 82 if (self.onComplete) { + 83 self.onComplete(); + 84 } + 85 } + 86 } + 87 }; + 88 + 89 jasmine.Queue.prototype.results = function() { + 90 var results = new jasmine.NestedResults(); + 91 for (var i = 0; i < this.blocks.length; i++) { + 92 if (this.blocks[i].results) { + 93 results.addResult(this.blocks[i].results()); + 94 } + 95 } + 96 return results; + 97 }; + 98 + 99 +100 \ No newline at end of file diff --git a/jsdoc/symbols/src/src_Spec.js.html b/jsdoc/symbols/src/src_Spec.js.html index bc8ef25..8d7ef7f 100644 --- a/jsdoc/symbols/src/src_Spec.js.html +++ b/jsdoc/symbols/src/src_Spec.js.html @@ -80,139 +80,171 @@ 73 return positive; 74 }; 75 - 76 jasmine.Spec.prototype.waits = function(timeout) { - 77 var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this); - 78 this.addToQueue(waitsFunc); - 79 return this; - 80 }; - 81 - 82 jasmine.Spec.prototype.waitsFor = function(timeout, latchFunction, timeoutMessage) { - 83 var waitsForFunc = new jasmine.WaitsForBlock(this.env, timeout, latchFunction, timeoutMessage, this); - 84 this.addToQueue(waitsForFunc); + 76 /** + 77 * Waits a fixed time period before moving to the next block. + 78 * + 79 * @deprecated Use waitsFor() instead + 80 * @param {Number} timeout milliseconds to wait + 81 */ + 82 jasmine.Spec.prototype.waits = function(timeout) { + 83 var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this); + 84 this.addToQueue(waitsFunc); 85 return this; 86 }; 87 - 88 jasmine.Spec.prototype.fail = function (e) { - 89 var expectationResult = new jasmine.ExpectationResult({ - 90 passed: false, - 91 message: e ? jasmine.util.formatException(e) : 'Exception' - 92 }); - 93 this.results_.addResult(expectationResult); - 94 }; - 95 - 96 jasmine.Spec.prototype.getMatchersClass_ = function() { - 97 return this.matchersClass || this.env.matchersClass; - 98 }; + 88 /** + 89 * Waits for the latchFunction to return true before proceeding to the next block. + 90 * + 91 * @param {Function} latchFunction + 92 * @param {String} optional_timeoutMessage + 93 * @param {Number} optional_timeout + 94 */ + 95 jasmine.Spec.prototype.waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) { + 96 var latchFunction_ = null; + 97 var optional_timeoutMessage_ = null; + 98 var optional_timeout_ = null; 99 -100 jasmine.Spec.prototype.addMatchers = function(matchersPrototype) { -101 var parent = this.getMatchersClass_(); -102 var newMatchersClass = function() { -103 parent.apply(this, arguments); -104 }; -105 jasmine.util.inherit(newMatchersClass, parent); -106 jasmine.Matchers.wrapInto_(matchersPrototype, newMatchersClass); -107 this.matchersClass = newMatchersClass; -108 }; -109 -110 jasmine.Spec.prototype.finishCallback = function() { -111 this.env.reporter.reportSpecResults(this); -112 }; -113 -114 jasmine.Spec.prototype.finish = function(onComplete) { -115 this.removeAllSpies(); -116 this.finishCallback(); -117 if (onComplete) { -118 onComplete(); -119 } -120 }; -121 -122 jasmine.Spec.prototype.after = function(doAfter) { -123 if (this.queue.isRunning()) { -124 this.queue.add(new jasmine.Block(this.env, doAfter, this)); -125 } else { -126 this.afterCallbacks.unshift(doAfter); -127 } -128 }; -129 -130 jasmine.Spec.prototype.execute = function(onComplete) { -131 var spec = this; -132 if (!spec.env.specFilter(spec)) { -133 spec.results_.skipped = true; -134 spec.finish(onComplete); -135 return; -136 } -137 -138 this.env.reporter.reportSpecStarting(this); -139 -140 spec.env.currentSpec = spec; +100 for (var i = 0; i < arguments.length; i++) { +101 var arg = arguments[i]; +102 switch (typeof arg) { +103 case 'function': +104 latchFunction_ = arg; +105 break; +106 case 'string': +107 optional_timeoutMessage_ = arg; +108 break; +109 case 'number': +110 optional_timeout_ = arg; +111 break; +112 } +113 } +114 +115 var waitsForFunc = new jasmine.WaitsForBlock(this.env, optional_timeout_, latchFunction_, optional_timeoutMessage_, this); +116 this.addToQueue(waitsForFunc); +117 return this; +118 }; +119 +120 jasmine.Spec.prototype.fail = function (e) { +121 var expectationResult = new jasmine.ExpectationResult({ +122 passed: false, +123 message: e ? jasmine.util.formatException(e) : 'Exception' +124 }); +125 this.results_.addResult(expectationResult); +126 }; +127 +128 jasmine.Spec.prototype.getMatchersClass_ = function() { +129 return this.matchersClass || this.env.matchersClass; +130 }; +131 +132 jasmine.Spec.prototype.addMatchers = function(matchersPrototype) { +133 var parent = this.getMatchersClass_(); +134 var newMatchersClass = function() { +135 parent.apply(this, arguments); +136 }; +137 jasmine.util.inherit(newMatchersClass, parent); +138 jasmine.Matchers.wrapInto_(matchersPrototype, newMatchersClass); +139 this.matchersClass = newMatchersClass; +140 }; 141 -142 spec.addBeforesAndAftersToQueue(); -143 -144 spec.queue.start(function () { -145 spec.finish(onComplete); -146 }); -147 }; -148 -149 jasmine.Spec.prototype.addBeforesAndAftersToQueue = function() { -150 var runner = this.env.currentRunner(); -151 var i; -152 -153 for (var suite = this.suite; suite; suite = suite.parentSuite) { -154 for (i = 0; i < suite.before_.length; i++) { -155 this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this)); -156 } -157 } -158 for (i = 0; i < runner.before_.length; i++) { -159 this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this)); -160 } -161 for (i = 0; i < this.afterCallbacks.length; i++) { -162 this.queue.add(new jasmine.Block(this.env, this.afterCallbacks[i], this)); -163 } -164 for (suite = this.suite; suite; suite = suite.parentSuite) { -165 for (i = 0; i < suite.after_.length; i++) { -166 this.queue.add(new jasmine.Block(this.env, suite.after_[i], this)); -167 } +142 jasmine.Spec.prototype.finishCallback = function() { +143 this.env.reporter.reportSpecResults(this); +144 }; +145 +146 jasmine.Spec.prototype.finish = function(onComplete) { +147 this.removeAllSpies(); +148 this.finishCallback(); +149 if (onComplete) { +150 onComplete(); +151 } +152 }; +153 +154 jasmine.Spec.prototype.after = function(doAfter) { +155 if (this.queue.isRunning()) { +156 this.queue.add(new jasmine.Block(this.env, doAfter, this)); +157 } else { +158 this.afterCallbacks.unshift(doAfter); +159 } +160 }; +161 +162 jasmine.Spec.prototype.execute = function(onComplete) { +163 var spec = this; +164 if (!spec.env.specFilter(spec)) { +165 spec.results_.skipped = true; +166 spec.finish(onComplete); +167 return; 168 } -169 for (i = 0; i < runner.after_.length; i++) { -170 this.queue.add(new jasmine.Block(this.env, runner.after_[i], this)); -171 } -172 }; +169 +170 this.env.reporter.reportSpecStarting(this); +171 +172 spec.env.currentSpec = spec; 173 -174 jasmine.Spec.prototype.explodes = function() { -175 throw 'explodes function should not have been called'; -176 }; -177 -178 jasmine.Spec.prototype.spyOn = function(obj, methodName, ignoreMethodDoesntExist) { -179 if (obj == jasmine.undefined) { -180 throw "spyOn could not find an object to spy upon for " + methodName + "()"; -181 } -182 -183 if (!ignoreMethodDoesntExist && obj[methodName] === jasmine.undefined) { -184 throw methodName + '() method does not exist'; -185 } -186 -187 if (!ignoreMethodDoesntExist && obj[methodName] && obj[methodName].isSpy) { -188 throw new Error(methodName + ' has already been spied upon'); +174 spec.addBeforesAndAftersToQueue(); +175 +176 spec.queue.start(function () { +177 spec.finish(onComplete); +178 }); +179 }; +180 +181 jasmine.Spec.prototype.addBeforesAndAftersToQueue = function() { +182 var runner = this.env.currentRunner(); +183 var i; +184 +185 for (var suite = this.suite; suite; suite = suite.parentSuite) { +186 for (i = 0; i < suite.before_.length; i++) { +187 this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this)); +188 } 189 } -190 -191 var spyObj = jasmine.createSpy(methodName); -192 -193 this.spies_.push(spyObj); -194 spyObj.baseObj = obj; -195 spyObj.methodName = methodName; -196 spyObj.originalValue = obj[methodName]; -197 -198 obj[methodName] = spyObj; -199 -200 return spyObj; -201 }; -202 -203 jasmine.Spec.prototype.removeAllSpies = function() { -204 for (var i = 0; i < this.spies_.length; i++) { -205 var spy = this.spies_[i]; -206 spy.baseObj[spy.methodName] = spy.originalValue; -207 } -208 this.spies_ = []; -209 }; -210 -211 \ No newline at end of file +190 for (i = 0; i < runner.before_.length; i++) { +191 this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this)); +192 } +193 for (i = 0; i < this.afterCallbacks.length; i++) { +194 this.queue.add(new jasmine.Block(this.env, this.afterCallbacks[i], this)); +195 } +196 for (suite = this.suite; suite; suite = suite.parentSuite) { +197 for (i = 0; i < suite.after_.length; i++) { +198 this.queue.add(new jasmine.Block(this.env, suite.after_[i], this)); +199 } +200 } +201 for (i = 0; i < runner.after_.length; i++) { +202 this.queue.add(new jasmine.Block(this.env, runner.after_[i], this)); +203 } +204 }; +205 +206 jasmine.Spec.prototype.explodes = function() { +207 throw 'explodes function should not have been called'; +208 }; +209 +210 jasmine.Spec.prototype.spyOn = function(obj, methodName, ignoreMethodDoesntExist) { +211 if (obj == jasmine.undefined) { +212 throw "spyOn could not find an object to spy upon for " + methodName + "()"; +213 } +214 +215 if (!ignoreMethodDoesntExist && obj[methodName] === jasmine.undefined) { +216 throw methodName + '() method does not exist'; +217 } +218 +219 if (!ignoreMethodDoesntExist && obj[methodName] && obj[methodName].isSpy) { +220 throw new Error(methodName + ' has already been spied upon'); +221 } +222 +223 var spyObj = jasmine.createSpy(methodName); +224 +225 this.spies_.push(spyObj); +226 spyObj.baseObj = obj; +227 spyObj.methodName = methodName; +228 spyObj.originalValue = obj[methodName]; +229 +230 obj[methodName] = spyObj; +231 +232 return spyObj; +233 }; +234 +235 jasmine.Spec.prototype.removeAllSpies = function() { +236 for (var i = 0; i < this.spies_.length; i++) { +237 var spy = this.spies_[i]; +238 spy.baseObj[spy.methodName] = spy.originalValue; +239 } +240 this.spies_ = []; +241 }; +242 +243 \ No newline at end of file diff --git a/jsdoc/symbols/src/src_WaitsForBlock.js.html b/jsdoc/symbols/src/src_WaitsForBlock.js.html index 18c2bda..5466ab4 100644 --- a/jsdoc/symbols/src/src_WaitsForBlock.js.html +++ b/jsdoc/symbols/src/src_WaitsForBlock.js.html @@ -5,40 +5,55 @@ .STRN {color: #393;} .REGX {color: #339;} .line {border-right: 1px dotted #666; color: #666; font-style: normal;} -
      1 jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) {
    -  2   this.timeout = timeout;
    -  3   this.latchFunction = latchFunction;
    -  4   this.message = message;
    -  5   this.totalTimeSpentWaitingForLatch = 0;
    -  6   jasmine.Block.call(this, env, null, spec);
    -  7 };
    -  8 
    -  9 jasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block);
    - 10 
    - 11 jasmine.WaitsForBlock.TIMEOUT_INCREMENT = 100;
    - 12 
    - 13 jasmine.WaitsForBlock.prototype.execute = function (onComplete) {
    - 14   var self = this;
    - 15   self.env.reporter.log('>> Jasmine waiting for ' + (self.message || 'something to happen'));
    - 16   var latchFunctionResult;
    - 17   try {
    - 18     latchFunctionResult = self.latchFunction.apply(self.spec);
    - 19   } catch (e) {
    - 20     self.spec.fail(e);
    - 21     onComplete();
    - 22     return;
    - 23   }
    - 24 
    - 25   if (latchFunctionResult) {
    - 26     onComplete();
    - 27   } else if (self.totalTimeSpentWaitingForLatch >= self.timeout) {
    - 28     var message = 'timed out after ' + self.timeout + ' msec waiting for ' + (self.message || 'something to happen');
    - 29     self.spec.fail({
    - 30       name: 'timeout',
    - 31       message: message
    - 32     });
    - 33   } else {
    - 34     self.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT;
    - 35     self.env.setTimeout(function () { self.execute(onComplete); }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT);
    - 36   }
    - 37 };
    \ No newline at end of file +
      1 /**
    +  2  * A block which waits for some condition to become true, with timeout.
    +  3  *
    +  4  * @constructor
    +  5  * @extends jasmine.Block
    +  6  * @param {jasmine.Env} env The Jasmine environment.
    +  7  * @param {Number} timeout The maximum time in milliseconds to wait for the condition to become true.
    +  8  * @param {Function} latchFunction A function which returns true when the desired condition has been met.
    +  9  * @param {String} message The message to display if the desired condition hasn't been met within the given time period.
    + 10  * @param {jasmine.Spec} spec The Jasmine spec.
    + 11  */
    + 12 jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) {
    + 13   this.timeout = timeout || env.defaultTimeoutInterval;
    + 14   this.latchFunction = latchFunction;
    + 15   this.message = message;
    + 16   this.totalTimeSpentWaitingForLatch = 0;
    + 17   jasmine.Block.call(this, env, null, spec);
    + 18 };
    + 19 jasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block);
    + 20 
    + 21 jasmine.WaitsForBlock.TIMEOUT_INCREMENT = 10;
    + 22 
    + 23 jasmine.WaitsForBlock.prototype.execute = function(onComplete) {
    + 24   this.env.reporter.log('>> Jasmine waiting for ' + (this.message || 'something to happen'));
    + 25   var latchFunctionResult;
    + 26   try {
    + 27     latchFunctionResult = this.latchFunction.apply(this.spec);
    + 28   } catch (e) {
    + 29     this.spec.fail(e);
    + 30     onComplete();
    + 31     return;
    + 32   }
    + 33 
    + 34   if (latchFunctionResult) {
    + 35     onComplete();
    + 36   } else if (this.totalTimeSpentWaitingForLatch >= this.timeout) {
    + 37     var message = 'timed out after ' + this.timeout + ' msec waiting for ' + (this.message || 'something to happen');
    + 38     this.spec.fail({
    + 39       name: 'timeout',
    + 40       message: message
    + 41     });
    + 42 
    + 43     this.abort = true;
    + 44     onComplete();
    + 45   } else {
    + 46     this.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT;
    + 47     var self = this;
    + 48     this.env.setTimeout(function() {
    + 49       self.execute(onComplete);
    + 50     }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT);
    + 51   }
    + 52 };
    \ No newline at end of file diff --git a/jsdoc/symbols/src/src_base.js.html b/jsdoc/symbols/src/src_base.js.html index 83bd46b..33add32 100644 --- a/jsdoc/symbols/src/src_base.js.html +++ b/jsdoc/symbols/src/src_base.js.html @@ -28,563 +28,570 @@ 21 jasmine.undefined = jasmine.___undefined___; 22 23 /** - 24 * Default interval for event loop yields. Small values here may result in slow test running. Zero means no updates until all tests have completed. + 24 * 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. 25 * 26 */ 27 jasmine.DEFAULT_UPDATE_INTERVAL = 250; 28 - 29 jasmine.getGlobal = function() { - 30 function getGlobal() { - 31 return this; - 32 } + 29 /** + 30 * Default timeout interval in milliseconds for waitsFor() blocks. + 31 */ + 32 jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000; 33 - 34 return getGlobal(); - 35 }; - 36 - 37 /** - 38 * Allows for bound functions to be compared. Internal use only. - 39 * - 40 * @ignore - 41 * @private - 42 * @param base {Object} bound 'this' for the function - 43 * @param name {Function} function to find - 44 */ - 45 jasmine.bindOriginal_ = function(base, name) { - 46 var original = base[name]; - 47 if (original.apply) { - 48 return function() { - 49 return original.apply(base, arguments); - 50 }; - 51 } else { - 52 // IE support - 53 return jasmine.getGlobal()[name]; - 54 } - 55 }; - 56 - 57 jasmine.setTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'setTimeout'); - 58 jasmine.clearTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearTimeout'); - 59 jasmine.setInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'setInterval'); - 60 jasmine.clearInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearInterval'); + 34 jasmine.getGlobal = function() { + 35 function getGlobal() { + 36 return this; + 37 } + 38 + 39 return getGlobal(); + 40 }; + 41 + 42 /** + 43 * Allows for bound functions to be compared. Internal use only. + 44 * + 45 * @ignore + 46 * @private + 47 * @param base {Object} bound 'this' for the function + 48 * @param name {Function} function to find + 49 */ + 50 jasmine.bindOriginal_ = function(base, name) { + 51 var original = base[name]; + 52 if (original.apply) { + 53 return function() { + 54 return original.apply(base, arguments); + 55 }; + 56 } else { + 57 // IE support + 58 return jasmine.getGlobal()[name]; + 59 } + 60 }; 61 - 62 jasmine.MessageResult = function(values) { - 63 this.type = 'log'; - 64 this.values = values; - 65 this.trace = new Error(); // todo: test better - 66 }; - 67 - 68 jasmine.MessageResult.prototype.toString = function() { - 69 var text = ""; - 70 for(var i = 0; i < this.values.length; i++) { - 71 if (i > 0) text += " "; - 72 if (jasmine.isString_(this.values[i])) { - 73 text += this.values[i]; - 74 } else { - 75 text += jasmine.pp(this.values[i]); - 76 } - 77 } - 78 return text; - 79 }; - 80 - 81 jasmine.ExpectationResult = function(params) { - 82 this.type = 'expect'; - 83 this.matcherName = params.matcherName; - 84 this.passed_ = params.passed; - 85 this.expected = params.expected; - 86 this.actual = params.actual; - 87 - 88 this.message = this.passed_ ? 'Passed.' : params.message; - 89 this.trace = this.passed_ ? '' : new Error(this.message); - 90 }; - 91 - 92 jasmine.ExpectationResult.prototype.toString = function () { - 93 return this.message; - 94 }; - 95 - 96 jasmine.ExpectationResult.prototype.passed = function () { - 97 return this.passed_; - 98 }; - 99 -100 /** -101 * Getter for the Jasmine environment. Ensures one gets created -102 */ -103 jasmine.getEnv = function() { -104 return jasmine.currentEnv_ = jasmine.currentEnv_ || new jasmine.Env(); -105 }; -106 -107 /** -108 * @ignore -109 * @private -110 * @param value -111 * @returns {Boolean} -112 */ -113 jasmine.isArray_ = function(value) { -114 return jasmine.isA_("Array", value); -115 }; -116 -117 /** -118 * @ignore -119 * @private -120 * @param value -121 * @returns {Boolean} -122 */ -123 jasmine.isString_ = function(value) { -124 return jasmine.isA_("String", value); -125 }; -126 -127 /** -128 * @ignore -129 * @private -130 * @param value -131 * @returns {Boolean} -132 */ -133 jasmine.isNumber_ = function(value) { -134 return jasmine.isA_("Number", value); -135 }; -136 -137 /** -138 * @ignore -139 * @private -140 * @param {String} typeName -141 * @param value -142 * @returns {Boolean} -143 */ -144 jasmine.isA_ = function(typeName, value) { -145 return Object.prototype.toString.apply(value) === '[object ' + typeName + ']'; -146 }; -147 -148 /** -149 * Pretty printer for expecations. Takes any object and turns it into a human-readable string. -150 * -151 * @param value {Object} an object to be outputted -152 * @returns {String} -153 */ -154 jasmine.pp = function(value) { -155 var stringPrettyPrinter = new jasmine.StringPrettyPrinter(); -156 stringPrettyPrinter.format(value); -157 return stringPrettyPrinter.string; -158 }; -159 -160 /** -161 * Returns true if the object is a DOM Node. -162 * -163 * @param {Object} obj object to check -164 * @returns {Boolean} -165 */ -166 jasmine.isDomNode = function(obj) { -167 return obj['nodeType'] > 0; -168 }; -169 -170 /** -171 * Returns a matchable 'generic' object of the class type. For use in expecations of type when values don't matter. -172 * -173 * @example -174 * // don't care about which function is passed in, as long as it's a function -175 * expect(mySpy).toHaveBeenCalledWith(jasmine.any(Function)); -176 * -177 * @param {Class} clazz -178 * @returns matchable object of the type clazz -179 */ -180 jasmine.any = function(clazz) { -181 return new jasmine.Matchers.Any(clazz); -182 }; -183 -184 /** -185 * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks. -186 * -187 * Spies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine -188 * expectation syntax. Spies can be checked if they were called or not and what the calling params were. -189 * -190 * A Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs). + 62 jasmine.setTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'setTimeout'); + 63 jasmine.clearTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearTimeout'); + 64 jasmine.setInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'setInterval'); + 65 jasmine.clearInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearInterval'); + 66 + 67 jasmine.MessageResult = function(values) { + 68 this.type = 'log'; + 69 this.values = values; + 70 this.trace = new Error(); // todo: test better + 71 }; + 72 + 73 jasmine.MessageResult.prototype.toString = function() { + 74 var text = ""; + 75 for(var i = 0; i < this.values.length; i++) { + 76 if (i > 0) text += " "; + 77 if (jasmine.isString_(this.values[i])) { + 78 text += this.values[i]; + 79 } else { + 80 text += jasmine.pp(this.values[i]); + 81 } + 82 } + 83 return text; + 84 }; + 85 + 86 jasmine.ExpectationResult = function(params) { + 87 this.type = 'expect'; + 88 this.matcherName = params.matcherName; + 89 this.passed_ = params.passed; + 90 this.expected = params.expected; + 91 this.actual = params.actual; + 92 + 93 this.message = this.passed_ ? 'Passed.' : params.message; + 94 this.trace = this.passed_ ? '' : new Error(this.message); + 95 }; + 96 + 97 jasmine.ExpectationResult.prototype.toString = function () { + 98 return this.message; + 99 }; +100 +101 jasmine.ExpectationResult.prototype.passed = function () { +102 return this.passed_; +103 }; +104 +105 /** +106 * Getter for the Jasmine environment. Ensures one gets created +107 */ +108 jasmine.getEnv = function() { +109 return jasmine.currentEnv_ = jasmine.currentEnv_ || new jasmine.Env(); +110 }; +111 +112 /** +113 * @ignore +114 * @private +115 * @param value +116 * @returns {Boolean} +117 */ +118 jasmine.isArray_ = function(value) { +119 return jasmine.isA_("Array", value); +120 }; +121 +122 /** +123 * @ignore +124 * @private +125 * @param value +126 * @returns {Boolean} +127 */ +128 jasmine.isString_ = function(value) { +129 return jasmine.isA_("String", value); +130 }; +131 +132 /** +133 * @ignore +134 * @private +135 * @param value +136 * @returns {Boolean} +137 */ +138 jasmine.isNumber_ = function(value) { +139 return jasmine.isA_("Number", value); +140 }; +141 +142 /** +143 * @ignore +144 * @private +145 * @param {String} typeName +146 * @param value +147 * @returns {Boolean} +148 */ +149 jasmine.isA_ = function(typeName, value) { +150 return Object.prototype.toString.apply(value) === '[object ' + typeName + ']'; +151 }; +152 +153 /** +154 * Pretty printer for expecations. Takes any object and turns it into a human-readable string. +155 * +156 * @param value {Object} an object to be outputted +157 * @returns {String} +158 */ +159 jasmine.pp = function(value) { +160 var stringPrettyPrinter = new jasmine.StringPrettyPrinter(); +161 stringPrettyPrinter.format(value); +162 return stringPrettyPrinter.string; +163 }; +164 +165 /** +166 * Returns true if the object is a DOM Node. +167 * +168 * @param {Object} obj object to check +169 * @returns {Boolean} +170 */ +171 jasmine.isDomNode = function(obj) { +172 return obj['nodeType'] > 0; +173 }; +174 +175 /** +176 * Returns a matchable 'generic' object of the class type. For use in expecations of type when values don't matter. +177 * +178 * @example +179 * // don't care about which function is passed in, as long as it's a function +180 * expect(mySpy).toHaveBeenCalledWith(jasmine.any(Function)); +181 * +182 * @param {Class} clazz +183 * @returns matchable object of the type clazz +184 */ +185 jasmine.any = function(clazz) { +186 return new jasmine.Matchers.Any(clazz); +187 }; +188 +189 /** +190 * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks. 191 * -192 * Spies are torn down at the end of every spec. -193 * -194 * Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj. -195 * -196 * @example -197 * // a stub -198 * var myStub = jasmine.createSpy('myStub'); // can be used anywhere -199 * -200 * // spy example -201 * var foo = { -202 * not: function(bool) { return !bool; } -203 * } +192 * Spies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine +193 * expectation syntax. Spies can be checked if they were called or not and what the calling params were. +194 * +195 * A Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs). +196 * +197 * Spies are torn down at the end of every spec. +198 * +199 * Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj. +200 * +201 * @example +202 * // a stub +203 * var myStub = jasmine.createSpy('myStub'); // can be used anywhere 204 * -205 * // actual foo.not will not be called, execution stops -206 * spyOn(foo, 'not'); -207 -208 // foo.not spied upon, execution will continue to implementation -209 * spyOn(foo, 'not').andCallThrough(); -210 * -211 * // fake example -212 * var foo = { -213 * not: function(bool) { return !bool; } -214 * } +205 * // spy example +206 * var foo = { +207 * not: function(bool) { return !bool; } +208 * } +209 * +210 * // actual foo.not will not be called, execution stops +211 * spyOn(foo, 'not'); +212 +213 // foo.not spied upon, execution will continue to implementation +214 * spyOn(foo, 'not').andCallThrough(); 215 * -216 * // foo.not(val) will return val -217 * spyOn(foo, 'not').andCallFake(function(value) {return value;}); -218 * -219 * // mock example -220 * foo.not(7 == 7); -221 * expect(foo.not).toHaveBeenCalled(); -222 * expect(foo.not).toHaveBeenCalledWith(true); +216 * // fake example +217 * var foo = { +218 * not: function(bool) { return !bool; } +219 * } +220 * +221 * // foo.not(val) will return val +222 * spyOn(foo, 'not').andCallFake(function(value) {return value;}); 223 * -224 * @constructor -225 * @see spyOn, jasmine.createSpy, jasmine.createSpyObj -226 * @param {String} name -227 */ -228 jasmine.Spy = function(name) { -229 /** -230 * The name of the spy, if provided. -231 */ -232 this.identity = name || 'unknown'; -233 /** -234 * Is this Object a spy? -235 */ -236 this.isSpy = true; -237 /** -238 * The actual function this spy stubs. -239 */ -240 this.plan = function() { -241 }; +224 * // mock example +225 * foo.not(7 == 7); +226 * expect(foo.not).toHaveBeenCalled(); +227 * expect(foo.not).toHaveBeenCalledWith(true); +228 * +229 * @constructor +230 * @see spyOn, jasmine.createSpy, jasmine.createSpyObj +231 * @param {String} name +232 */ +233 jasmine.Spy = function(name) { +234 /** +235 * The name of the spy, if provided. +236 */ +237 this.identity = name || 'unknown'; +238 /** +239 * Is this Object a spy? +240 */ +241 this.isSpy = true; 242 /** -243 * Tracking of the most recent call to the spy. -244 * @example -245 * var mySpy = jasmine.createSpy('foo'); -246 * mySpy(1, 2); -247 * mySpy.mostRecentCall.args = [1, 2]; -248 */ -249 this.mostRecentCall = {}; -250 -251 /** -252 * Holds arguments for each call to the spy, indexed by call count -253 * @example -254 * var mySpy = jasmine.createSpy('foo'); -255 * mySpy(1, 2); -256 * mySpy(7, 8); -257 * mySpy.mostRecentCall.args = [7, 8]; -258 * mySpy.argsForCall[0] = [1, 2]; -259 * mySpy.argsForCall[1] = [7, 8]; -260 */ -261 this.argsForCall = []; -262 this.calls = []; -263 }; -264 -265 /** -266 * Tells a spy to call through to the actual implemenatation. -267 * -268 * @example -269 * var foo = { -270 * bar: function() { // do some stuff } -271 * } +243 * The actual function this spy stubs. +244 */ +245 this.plan = function() { +246 }; +247 /** +248 * Tracking of the most recent call to the spy. +249 * @example +250 * var mySpy = jasmine.createSpy('foo'); +251 * mySpy(1, 2); +252 * mySpy.mostRecentCall.args = [1, 2]; +253 */ +254 this.mostRecentCall = {}; +255 +256 /** +257 * Holds arguments for each call to the spy, indexed by call count +258 * @example +259 * var mySpy = jasmine.createSpy('foo'); +260 * mySpy(1, 2); +261 * mySpy(7, 8); +262 * mySpy.mostRecentCall.args = [7, 8]; +263 * mySpy.argsForCall[0] = [1, 2]; +264 * mySpy.argsForCall[1] = [7, 8]; +265 */ +266 this.argsForCall = []; +267 this.calls = []; +268 }; +269 +270 /** +271 * Tells a spy to call through to the actual implemenatation. 272 * -273 * // defining a spy on an existing property: foo.bar -274 * spyOn(foo, 'bar').andCallThrough(); -275 */ -276 jasmine.Spy.prototype.andCallThrough = function() { -277 this.plan = this.originalValue; -278 return this; -279 }; -280 -281 /** -282 * For setting the return value of a spy. -283 * -284 * @example -285 * // defining a spy from scratch: foo() returns 'baz' -286 * var foo = jasmine.createSpy('spy on foo').andReturn('baz'); -287 * -288 * // defining a spy on an existing property: foo.bar() returns 'baz' -289 * spyOn(foo, 'bar').andReturn('baz'); -290 * -291 * @param {Object} value -292 */ -293 jasmine.Spy.prototype.andReturn = function(value) { -294 this.plan = function() { -295 return value; -296 }; -297 return this; -298 }; -299 -300 /** -301 * For throwing an exception when a spy is called. -302 * -303 * @example -304 * // defining a spy from scratch: foo() throws an exception w/ message 'ouch' -305 * var foo = jasmine.createSpy('spy on foo').andThrow('baz'); -306 * -307 * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch' -308 * spyOn(foo, 'bar').andThrow('baz'); -309 * -310 * @param {String} exceptionMsg -311 */ -312 jasmine.Spy.prototype.andThrow = function(exceptionMsg) { -313 this.plan = function() { -314 throw exceptionMsg; -315 }; -316 return this; -317 }; -318 -319 /** -320 * Calls an alternate implementation when a spy is called. -321 * -322 * @example -323 * var baz = function() { -324 * // do some stuff, return something -325 * } -326 * // defining a spy from scratch: foo() calls the function baz -327 * var foo = jasmine.createSpy('spy on foo').andCall(baz); -328 * -329 * // defining a spy on an existing property: foo.bar() calls an anonymnous function -330 * spyOn(foo, 'bar').andCall(function() { return 'baz';} ); -331 * -332 * @param {Function} fakeFunc -333 */ -334 jasmine.Spy.prototype.andCallFake = function(fakeFunc) { -335 this.plan = fakeFunc; -336 return this; -337 }; -338 -339 /** -340 * Resets all of a spy's the tracking variables so that it can be used again. -341 * -342 * @example -343 * spyOn(foo, 'bar'); -344 * -345 * foo.bar(); +273 * @example +274 * var foo = { +275 * bar: function() { // do some stuff } +276 * } +277 * +278 * // defining a spy on an existing property: foo.bar +279 * spyOn(foo, 'bar').andCallThrough(); +280 */ +281 jasmine.Spy.prototype.andCallThrough = function() { +282 this.plan = this.originalValue; +283 return this; +284 }; +285 +286 /** +287 * For setting the return value of a spy. +288 * +289 * @example +290 * // defining a spy from scratch: foo() returns 'baz' +291 * var foo = jasmine.createSpy('spy on foo').andReturn('baz'); +292 * +293 * // defining a spy on an existing property: foo.bar() returns 'baz' +294 * spyOn(foo, 'bar').andReturn('baz'); +295 * +296 * @param {Object} value +297 */ +298 jasmine.Spy.prototype.andReturn = function(value) { +299 this.plan = function() { +300 return value; +301 }; +302 return this; +303 }; +304 +305 /** +306 * For throwing an exception when a spy is called. +307 * +308 * @example +309 * // defining a spy from scratch: foo() throws an exception w/ message 'ouch' +310 * var foo = jasmine.createSpy('spy on foo').andThrow('baz'); +311 * +312 * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch' +313 * spyOn(foo, 'bar').andThrow('baz'); +314 * +315 * @param {String} exceptionMsg +316 */ +317 jasmine.Spy.prototype.andThrow = function(exceptionMsg) { +318 this.plan = function() { +319 throw exceptionMsg; +320 }; +321 return this; +322 }; +323 +324 /** +325 * Calls an alternate implementation when a spy is called. +326 * +327 * @example +328 * var baz = function() { +329 * // do some stuff, return something +330 * } +331 * // defining a spy from scratch: foo() calls the function baz +332 * var foo = jasmine.createSpy('spy on foo').andCall(baz); +333 * +334 * // defining a spy on an existing property: foo.bar() calls an anonymnous function +335 * spyOn(foo, 'bar').andCall(function() { return 'baz';} ); +336 * +337 * @param {Function} fakeFunc +338 */ +339 jasmine.Spy.prototype.andCallFake = function(fakeFunc) { +340 this.plan = fakeFunc; +341 return this; +342 }; +343 +344 /** +345 * Resets all of a spy's the tracking variables so that it can be used again. 346 * -347 * expect(foo.bar.callCount).toEqual(1); -348 * -349 * foo.bar.reset(); -350 * -351 * expect(foo.bar.callCount).toEqual(0); -352 */ -353 jasmine.Spy.prototype.reset = function() { -354 this.wasCalled = false; -355 this.callCount = 0; -356 this.argsForCall = []; -357 this.calls = []; -358 this.mostRecentCall = {}; -359 }; -360 -361 jasmine.createSpy = function(name) { -362 -363 var spyObj = function() { -364 spyObj.wasCalled = true; -365 spyObj.callCount++; -366 var args = jasmine.util.argsToArray(arguments); -367 spyObj.mostRecentCall.object = this; -368 spyObj.mostRecentCall.args = args; -369 spyObj.argsForCall.push(args); -370 spyObj.calls.push({object: this, args: args}); -371 return spyObj.plan.apply(this, arguments); -372 }; -373 -374 var spy = new jasmine.Spy(name); -375 -376 for (var prop in spy) { -377 spyObj[prop] = spy[prop]; -378 } -379 -380 spyObj.reset(); -381 -382 return spyObj; -383 }; +347 * @example +348 * spyOn(foo, 'bar'); +349 * +350 * foo.bar(); +351 * +352 * expect(foo.bar.callCount).toEqual(1); +353 * +354 * foo.bar.reset(); +355 * +356 * expect(foo.bar.callCount).toEqual(0); +357 */ +358 jasmine.Spy.prototype.reset = function() { +359 this.wasCalled = false; +360 this.callCount = 0; +361 this.argsForCall = []; +362 this.calls = []; +363 this.mostRecentCall = {}; +364 }; +365 +366 jasmine.createSpy = function(name) { +367 +368 var spyObj = function() { +369 spyObj.wasCalled = true; +370 spyObj.callCount++; +371 var args = jasmine.util.argsToArray(arguments); +372 spyObj.mostRecentCall.object = this; +373 spyObj.mostRecentCall.args = args; +374 spyObj.argsForCall.push(args); +375 spyObj.calls.push({object: this, args: args}); +376 return spyObj.plan.apply(this, arguments); +377 }; +378 +379 var spy = new jasmine.Spy(name); +380 +381 for (var prop in spy) { +382 spyObj[prop] = spy[prop]; +383 } 384 -385 /** -386 * Determines whether an object is a spy. -387 * -388 * @param {jasmine.Spy|Object} putativeSpy -389 * @returns {Boolean} -390 */ -391 jasmine.isSpy = function(putativeSpy) { -392 return putativeSpy && putativeSpy.isSpy; -393 }; -394 -395 /** -396 * Creates a more complicated spy: an Object that has every property a function that is a spy. Used for stubbing something -397 * large in one call. -398 * -399 * @param {String} baseName name of spy class -400 * @param {Array} methodNames array of names of methods to make spies -401 */ -402 jasmine.createSpyObj = function(baseName, methodNames) { -403 if (!jasmine.isArray_(methodNames) || methodNames.length == 0) { -404 throw new Error('createSpyObj requires a non-empty array of method names to create spies for'); -405 } -406 var obj = {}; -407 for (var i = 0; i < methodNames.length; i++) { -408 obj[methodNames[i]] = jasmine.createSpy(baseName + '.' + methodNames[i]); -409 } -410 return obj; -411 }; -412 -413 /** -414 * All parameters are pretty-printed and concatenated together, then written to the current spec's output. -415 * -416 * Be careful not to leave calls to <code>jasmine.log</code> in production code. -417 */ -418 jasmine.log = function() { -419 var spec = jasmine.getEnv().currentSpec; -420 spec.log.apply(spec, arguments); -421 }; -422 -423 /** -424 * Function that installs a spy on an existing object's method name. Used within a Spec to create a spy. -425 * -426 * @example -427 * // spy example -428 * var foo = { -429 * not: function(bool) { return !bool; } -430 * } -431 * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops -432 * -433 * @see jasmine.createSpy -434 * @param obj -435 * @param methodName -436 * @returns a Jasmine spy that can be chained with all spy methods -437 */ -438 var spyOn = function(obj, methodName) { -439 return jasmine.getEnv().currentSpec.spyOn(obj, methodName); -440 }; -441 -442 /** -443 * Creates a Jasmine spec that will be added to the current suite. -444 * -445 * // TODO: pending tests -446 * -447 * @example -448 * it('should be true', function() { -449 * expect(true).toEqual(true); -450 * }); +385 spyObj.reset(); +386 +387 return spyObj; +388 }; +389 +390 /** +391 * Determines whether an object is a spy. +392 * +393 * @param {jasmine.Spy|Object} putativeSpy +394 * @returns {Boolean} +395 */ +396 jasmine.isSpy = function(putativeSpy) { +397 return putativeSpy && putativeSpy.isSpy; +398 }; +399 +400 /** +401 * Creates a more complicated spy: an Object that has every property a function that is a spy. Used for stubbing something +402 * large in one call. +403 * +404 * @param {String} baseName name of spy class +405 * @param {Array} methodNames array of names of methods to make spies +406 */ +407 jasmine.createSpyObj = function(baseName, methodNames) { +408 if (!jasmine.isArray_(methodNames) || methodNames.length == 0) { +409 throw new Error('createSpyObj requires a non-empty array of method names to create spies for'); +410 } +411 var obj = {}; +412 for (var i = 0; i < methodNames.length; i++) { +413 obj[methodNames[i]] = jasmine.createSpy(baseName + '.' + methodNames[i]); +414 } +415 return obj; +416 }; +417 +418 /** +419 * All parameters are pretty-printed and concatenated together, then written to the current spec's output. +420 * +421 * Be careful not to leave calls to <code>jasmine.log</code> in production code. +422 */ +423 jasmine.log = function() { +424 var spec = jasmine.getEnv().currentSpec; +425 spec.log.apply(spec, arguments); +426 }; +427 +428 /** +429 * Function that installs a spy on an existing object's method name. Used within a Spec to create a spy. +430 * +431 * @example +432 * // spy example +433 * var foo = { +434 * not: function(bool) { return !bool; } +435 * } +436 * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops +437 * +438 * @see jasmine.createSpy +439 * @param obj +440 * @param methodName +441 * @returns a Jasmine spy that can be chained with all spy methods +442 */ +443 var spyOn = function(obj, methodName) { +444 return jasmine.getEnv().currentSpec.spyOn(obj, methodName); +445 }; +446 +447 /** +448 * Creates a Jasmine spec that will be added to the current suite. +449 * +450 * // TODO: pending tests 451 * -452 * @param {String} desc description of this specification -453 * @param {Function} func defines the preconditions and expectations of the spec -454 */ -455 var it = function(desc, func) { -456 return jasmine.getEnv().it(desc, func); -457 }; -458 -459 /** -460 * Creates a <em>disabled</em> Jasmine spec. -461 * -462 * A convenience method that allows existing specs to be disabled temporarily during development. -463 * -464 * @param {String} desc description of this specification -465 * @param {Function} func defines the preconditions and expectations of the spec -466 */ -467 var xit = function(desc, func) { -468 return jasmine.getEnv().xit(desc, func); -469 }; -470 -471 /** -472 * Starts a chain for a Jasmine expectation. -473 * -474 * It is passed an Object that is the actual value and should chain to one of the many -475 * jasmine.Matchers functions. -476 * -477 * @param {Object} actual Actual value to test against and expected value -478 */ -479 var expect = function(actual) { -480 return jasmine.getEnv().currentSpec.expect(actual); -481 }; -482 -483 /** -484 * Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs. -485 * -486 * @param {Function} func Function that defines part of a jasmine spec. -487 */ -488 var runs = function(func) { -489 jasmine.getEnv().currentSpec.runs(func); -490 }; -491 -492 /** -493 * Waits for a timeout before moving to the next runs()-defined block. -494 * @param {Number} timeout -495 */ -496 var waits = function(timeout) { -497 jasmine.getEnv().currentSpec.waits(timeout); -498 }; -499 -500 /** -501 * Waits for the latchFunction to return true before proceeding to the next runs()-defined block. -502 * -503 * @param {Number} timeout -504 * @param {Function} latchFunction -505 * @param {String} message -506 */ -507 var waitsFor = function(timeout, latchFunction, message) { -508 jasmine.getEnv().currentSpec.waitsFor(timeout, latchFunction, message); -509 }; -510 -511 /** -512 * A function that is called before each spec in a suite. -513 * -514 * Used for spec setup, including validating assumptions. -515 * -516 * @param {Function} beforeEachFunction -517 */ -518 var beforeEach = function(beforeEachFunction) { -519 jasmine.getEnv().beforeEach(beforeEachFunction); -520 }; -521 -522 /** -523 * A function that is called after each spec in a suite. -524 * -525 * Used for restoring any state that is hijacked during spec execution. -526 * -527 * @param {Function} afterEachFunction -528 */ -529 var afterEach = function(afterEachFunction) { -530 jasmine.getEnv().afterEach(afterEachFunction); -531 }; -532 -533 /** -534 * Defines a suite of specifications. -535 * -536 * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared -537 * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization -538 * of setup in some tests. -539 * -540 * @example -541 * // TODO: a simple suite +452 * @example +453 * it('should be true', function() { +454 * expect(true).toEqual(true); +455 * }); +456 * +457 * @param {String} desc description of this specification +458 * @param {Function} func defines the preconditions and expectations of the spec +459 */ +460 var it = function(desc, func) { +461 return jasmine.getEnv().it(desc, func); +462 }; +463 +464 /** +465 * Creates a <em>disabled</em> Jasmine spec. +466 * +467 * A convenience method that allows existing specs to be disabled temporarily during development. +468 * +469 * @param {String} desc description of this specification +470 * @param {Function} func defines the preconditions and expectations of the spec +471 */ +472 var xit = function(desc, func) { +473 return jasmine.getEnv().xit(desc, func); +474 }; +475 +476 /** +477 * Starts a chain for a Jasmine expectation. +478 * +479 * It is passed an Object that is the actual value and should chain to one of the many +480 * jasmine.Matchers functions. +481 * +482 * @param {Object} actual Actual value to test against and expected value +483 */ +484 var expect = function(actual) { +485 return jasmine.getEnv().currentSpec.expect(actual); +486 }; +487 +488 /** +489 * Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs. +490 * +491 * @param {Function} func Function that defines part of a jasmine spec. +492 */ +493 var runs = function(func) { +494 jasmine.getEnv().currentSpec.runs(func); +495 }; +496 +497 /** +498 * Waits a fixed time period before moving to the next block. +499 * +500 * @deprecated Use waitsFor() instead +501 * @param {Number} timeout milliseconds to wait +502 */ +503 var waits = function(timeout) { +504 jasmine.getEnv().currentSpec.waits(timeout); +505 }; +506 +507 /** +508 * Waits for the latchFunction to return true before proceeding to the next block. +509 * +510 * @param {Function} latchFunction +511 * @param {String} optional_timeoutMessage +512 * @param {Number} optional_timeout +513 */ +514 var waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) { +515 jasmine.getEnv().currentSpec.waitsFor.apply(jasmine.getEnv().currentSpec, arguments); +516 }; +517 +518 /** +519 * A function that is called before each spec in a suite. +520 * +521 * Used for spec setup, including validating assumptions. +522 * +523 * @param {Function} beforeEachFunction +524 */ +525 var beforeEach = function(beforeEachFunction) { +526 jasmine.getEnv().beforeEach(beforeEachFunction); +527 }; +528 +529 /** +530 * A function that is called after each spec in a suite. +531 * +532 * Used for restoring any state that is hijacked during spec execution. +533 * +534 * @param {Function} afterEachFunction +535 */ +536 var afterEach = function(afterEachFunction) { +537 jasmine.getEnv().afterEach(afterEachFunction); +538 }; +539 +540 /** +541 * Defines a suite of specifications. 542 * -543 * // TODO: a simple suite with a nested describe block -544 * -545 * @param {String} description A string, usually the class under test. -546 * @param {Function} specDefinitions function that defines several specs. -547 */ -548 var describe = function(description, specDefinitions) { -549 return jasmine.getEnv().describe(description, specDefinitions); -550 }; -551 -552 /** -553 * Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development. -554 * -555 * @param {String} description A string, usually the class under test. -556 * @param {Function} specDefinitions function that defines several specs. -557 */ -558 var xdescribe = function(description, specDefinitions) { -559 return jasmine.getEnv().xdescribe(description, specDefinitions); -560 }; -561 -562 -563 // Provide the XMLHttpRequest class for IE 5.x-6.x: -564 jasmine.XmlHttpRequest = (typeof XMLHttpRequest == "undefined") ? function() { -565 try { -566 return new ActiveXObject("Msxml2.XMLHTTP.6.0"); -567 } catch(e) { -568 } -569 try { -570 return new ActiveXObject("Msxml2.XMLHTTP.3.0"); -571 } catch(e) { -572 } -573 try { -574 return new ActiveXObject("Msxml2.XMLHTTP"); -575 } catch(e) { -576 } -577 try { -578 return new ActiveXObject("Microsoft.XMLHTTP"); -579 } catch(e) { -580 } -581 throw new Error("This browser does not support XMLHttpRequest."); -582 } : XMLHttpRequest; -583 \ No newline at end of file +543 * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared +544 * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization +545 * of setup in some tests. +546 * +547 * @example +548 * // TODO: a simple suite +549 * +550 * // TODO: a simple suite with a nested describe block +551 * +552 * @param {String} description A string, usually the class under test. +553 * @param {Function} specDefinitions function that defines several specs. +554 */ +555 var describe = function(description, specDefinitions) { +556 return jasmine.getEnv().describe(description, specDefinitions); +557 }; +558 +559 /** +560 * Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development. +561 * +562 * @param {String} description A string, usually the class under test. +563 * @param {Function} specDefinitions function that defines several specs. +564 */ +565 var xdescribe = function(description, specDefinitions) { +566 return jasmine.getEnv().xdescribe(description, specDefinitions); +567 }; +568 +569 +570 // Provide the XMLHttpRequest class for IE 5.x-6.x: +571 jasmine.XmlHttpRequest = (typeof XMLHttpRequest == "undefined") ? function() { +572 try { +573 return new ActiveXObject("Msxml2.XMLHTTP.6.0"); +574 } catch(e) { +575 } +576 try { +577 return new ActiveXObject("Msxml2.XMLHTTP.3.0"); +578 } catch(e) { +579 } +580 try { +581 return new ActiveXObject("Msxml2.XMLHTTP"); +582 } catch(e) { +583 } +584 try { +585 return new ActiveXObject("Microsoft.XMLHTTP"); +586 } catch(e) { +587 } +588 throw new Error("This browser does not support XMLHttpRequest."); +589 } : XMLHttpRequest; +590 \ No newline at end of file