diff --git a/Rakefile b/Rakefile index 8b4179d..db5e993 100644 --- a/Rakefile +++ b/Rakefile @@ -63,7 +63,7 @@ jasmine.version_= { JsdocHelper::Rake::Task.new(:lambda_jsdoc) do |t| t[:files] = jasmine_sources << 'lib/TrivialReporter.js' - p t.inspect + t[:options] = "-a" end Rake::Task[:lambda_jsdoc].invoke end diff --git a/doc/files.html b/doc/files.html index 269d5e6..bce9c40 100644 --- a/doc/files.html +++ b/doc/files.html @@ -190,6 +190,8 @@ ul.inheritsList
  • jasmine.Block
  • +
  • jasmine.Clock
  • +
  • jasmine.Env
  • jasmine.JsApiReporter
  • @@ -452,7 +454,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:30 GMT-0500 (EST)
    \ No newline at end of file diff --git a/doc/index.html b/doc/index.html index 8324565..2f8b49a 100644 --- a/doc/index.html +++ b/doc/index.html @@ -190,6 +190,8 @@ ul.inheritsList
  • jasmine.Block
  • +
  • jasmine.Clock
  • +
  • jasmine.Env
  • jasmine.JsApiReporter
  • @@ -238,6 +240,12 @@ ul.inheritsList
    +
    +

    jasmine.Clock

    + +
    +
    +

    jasmine.Env

    @@ -308,7 +316,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:30 GMT-0500 (EST)
    \ No newline at end of file diff --git a/doc/symbols/_global_.html b/doc/symbols/_global_.html index c4f4228..2b25eed 100644 --- a/doc/symbols/_global_.html +++ b/doc/symbols/_global_.html @@ -195,6 +195,8 @@ ul.inheritsList
  • jasmine.Block
  • +
  • jasmine.Clock
  • +
  • jasmine.Env
  • jasmine.JsApiReporter
  • @@ -709,7 +711,7 @@ spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
    See:
    -
    jasmine.createSpy
    +
    jasmine.createSpy
    @@ -910,7 +912,7 @@ A convenience method that allows existing specs to be disabled temporarily durin
    - Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:06 GMT-0500 (EST) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:29 GMT-0500 (EST)
    diff --git a/doc/symbols/jasmine.Block.html b/doc/symbols/jasmine.Block.html index 3dbc184..f50be43 100644 --- a/doc/symbols/jasmine.Block.html +++ b/doc/symbols/jasmine.Block.html @@ -195,6 +195,8 @@ ul.inheritsList
  • jasmine.Block
  • +
  • jasmine.Clock
  • +
  • jasmine.Env
  • jasmine.JsApiReporter
  • @@ -269,6 +271,33 @@ ul.inheritsList + + + + + + + + + + + + + + + + + + +
    Method Summary
    Method AttributesMethod Name and Description
      +
    execute(onComplete) +
    +
    +
    + + + + @@ -330,6 +359,47 @@ ul.inheritsList +
    + Method Detail +
    + + +
    + + + execute(onComplete) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + onComplete + +
    +
    + +
    + + + + + + + + + + + @@ -341,7 +411,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:06 GMT-0500 (EST) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:29 GMT-0500 (EST)
    diff --git a/doc/symbols/jasmine.Clock.html b/doc/symbols/jasmine.Clock.html new file mode 100644 index 0000000..dbe6f6a --- /dev/null +++ b/doc/symbols/jasmine.Clock.html @@ -0,0 +1,678 @@ + + + + + + + JsDoc Reference - jasmine.Clock + + + + + + + + + + + +
    + +
    Class Index +| File Index
    +
    +

    Classes

    + +
    + +
    + +
    + +

    + + Namespace jasmine.Clock +

    + + +

    + + + + + +
    Defined in: mock-timeout.js. + +

    + + + + + + + + + + + + + + + + + +
    Namespace Summary
    Constructor AttributesConstructor Name and Description
      + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Method Summary
    Method AttributesMethod Name and Description
    <static>   +
    jasmine.Clock.assertInstalled() +
    +
    +
    <static>   +
    jasmine.Clock.installMock() +
    +
    +
    <static>   +
    jasmine.Clock.reset() +
    +
    +
    <static>   +
    jasmine.Clock.runFunctionsWithinRange(oldMillis, nowMillis) +
    +
    +
    <static>   +
    jasmine.Clock.scheduleFunction(timeoutKey, funcToCall, millis, recurring) +
    +
    +
    <static>   +
    jasmine.Clock.tick(millis) +
    +
    +
    <static>   +
    jasmine.Clock.uninstallMock() +
    +
    +
    <static>   +
    jasmine.Clock.useMock() +
    +
    +
    + + + + + + + + + +
    +
    + Namespace Detail +
    + +
    + jasmine.Clock +
    + +
    + + +
    + + + + + + + + + + + + +
    + + + + + + + +
    + Method Detail +
    + + +
    <static> + + + jasmine.Clock.assertInstalled() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    <static> + + + jasmine.Clock.installMock() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    <static> + + + jasmine.Clock.reset() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    <static> + + + jasmine.Clock.runFunctionsWithinRange(oldMillis, nowMillis) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + oldMillis + +
    +
    + +
    + nowMillis + +
    +
    + +
    + + + + + + + + +
    + + +
    <static> + + + jasmine.Clock.scheduleFunction(timeoutKey, funcToCall, millis, recurring) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + timeoutKey + +
    +
    + +
    + funcToCall + +
    +
    + +
    + millis + +
    +
    + +
    + recurring + +
    +
    + +
    + + + + + + + + +
    + + +
    <static> + + + jasmine.Clock.tick(millis) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + millis + +
    +
    + +
    + + + + + + + + +
    + + +
    <static> + + + jasmine.Clock.uninstallMock() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    <static> + + + jasmine.Clock.useMock() + +
    +
    + + + +
    + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:29 GMT-0500 (EST) +
    + + diff --git a/doc/symbols/jasmine.Env.html b/doc/symbols/jasmine.Env.html index f9a75a7..ac69aa9 100644 --- a/doc/symbols/jasmine.Env.html +++ b/doc/symbols/jasmine.Env.html @@ -195,6 +195,8 @@ ul.inheritsList
  • jasmine.Block
  • +
  • jasmine.Clock
  • +
  • jasmine.Env
  • jasmine.JsApiReporter
  • @@ -281,6 +283,15 @@ ul.inheritsList + +   + +
    addEqualityTester(equalityTester) +
    +
    + + +   @@ -290,6 +301,87 @@ ul.inheritsList + +   + +
    afterEach(afterEachFunction) +
    +
    + + + + +   + +
    beforeEach(beforeEachFunction) +
    +
    + + + + +   + +
    compareObjects_(a, b, mismatchKeys, mismatchValues) +
    +
    + + + + +   + +
    contains_(haystack, needle) +
    +
    + + + + +   + +
    currentRunner() +
    +
    + + + + +   + +
    describe(description, specDefinitions) +
    +
    + + + + +   + +
    equals_(a, b, mismatchKeys, mismatchValues) +
    +
    + + + + +   + +
    execute() +
    +
    + + + + +   + +
    it(description, func) +
    +
    + + +   @@ -308,6 +400,15 @@ ul.inheritsList + +   + +
    specFilter() +
    +
    + + +   @@ -317,6 +418,24 @@ ul.inheritsList + +   + +
    xdescribe(desc, specDefinitions) +
    +
    + + + + +   + +
    xit(desc, func) +
    +
    + + + @@ -365,6 +484,42 @@ ul.inheritsList Method Detail + +
    + + + addEqualityTester(equalityTester) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + equalityTester + +
    +
    + +
    + + + + + + + + +
    +
    @@ -399,6 +554,362 @@ ul.inheritsList +
    + + +
    + + + afterEach(afterEachFunction) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + afterEachFunction + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + beforeEach(beforeEachFunction) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + beforeEachFunction + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + compareObjects_(a, b, mismatchKeys, mismatchValues) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + a + +
    +
    + +
    + b + +
    +
    + +
    + mismatchKeys + +
    +
    + +
    + mismatchValues + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + contains_(haystack, needle) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + haystack + +
    +
    + +
    + needle + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + currentRunner() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    + + + describe(description, specDefinitions) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + description + +
    +
    + +
    + specDefinitions + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + equals_(a, b, mismatchKeys, mismatchValues) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + a + +
    +
    + +
    + b + +
    +
    + +
    + mismatchKeys + +
    +
    + +
    + mismatchValues + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + execute() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    + + + it(description, func) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + description + +
    +
    + +
    + func + +
    +
    + +
    + + + + + + + +
    @@ -463,6 +974,31 @@ ul.inheritsList +
    + + +
    + + + specFilter() + +
    +
    + + + +
    + + + + + + + + + + +
    @@ -495,6 +1031,90 @@ ul.inheritsList +
    + + +
    + + + xdescribe(desc, specDefinitions) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + desc + +
    +
    + +
    + specDefinitions + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + xit(desc, func) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + desc + +
    +
    + +
    + func + +
    +
    + +
    + + + + + + + + @@ -509,7 +1129,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:06 GMT-0500 (EST) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:29 GMT-0500 (EST)
    diff --git a/doc/symbols/jasmine.JsApiReporter.html b/doc/symbols/jasmine.JsApiReporter.html index 83ebeb3..38ea39f 100644 --- a/doc/symbols/jasmine.JsApiReporter.html +++ b/doc/symbols/jasmine.JsApiReporter.html @@ -195,6 +195,8 @@ ul.inheritsList
  • jasmine.Block
  • +
  • jasmine.Clock
  • +
  • jasmine.Env
  • jasmine.JsApiReporter
  • @@ -269,6 +271,123 @@ ul.inheritsList + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Method Summary
    Method AttributesMethod Name and Description
      +
    log(str) +
    +
    +
      + +
    +
      + +
    +
      + +
    +
      + +
    +
      +
    results() +
    +
    +
      +
    resultsForSpec(specId) +
    +
    +
      +
    resultsForSpecs(specIds) +
    +
    +
      +
    suites() +
    +
    +
      +
    summarize_(suiteOrSpec) +
    +
    +
      +
    summarizeResult_(result) +
    +
    +
    + + + + @@ -307,6 +426,385 @@ ul.inheritsList +
    + Method Detail +
    + + +
    + + + log(str) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + str + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + reportRunnerResults(runner) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + runner + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + reportRunnerStarting(runner) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + runner + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + reportSpecResults(spec) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + spec + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + reportSuiteResults(suite) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + suite + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + results() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    + + + resultsForSpec(specId) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + specId + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + resultsForSpecs(specIds) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + specIds + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + suites() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    + + + summarize_(suiteOrSpec) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + suiteOrSpec + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + summarizeResult_(result) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + result + +
    +
    + +
    + + + + + + + + + + + @@ -318,7 +816,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:06 GMT-0500 (EST) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:30 GMT-0500 (EST)
    diff --git a/doc/symbols/jasmine.Matchers.html b/doc/symbols/jasmine.Matchers.html index 85b8394..6aa15b3 100644 --- a/doc/symbols/jasmine.Matchers.html +++ b/doc/symbols/jasmine.Matchers.html @@ -195,6 +195,8 @@ ul.inheritsList
  • jasmine.Block
  • +
  • jasmine.Clock
  • +
  • jasmine.Env
  • jasmine.JsApiReporter
  • @@ -447,6 +449,60 @@ ul.inheritsList + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Method Summary
    Method AttributesMethod Name and Description
    <static>   +
    jasmine.Matchers.Any(expectedClass) +
    +
    +
    <static>   +
    jasmine.Matchers.matcherFn_(matcherName, options) +
    +
    +
    <static>   +
    jasmine.Matchers.pp(str) +
    +
    +
      +
    report(result, failing_message, details) +
    +
    +
    + + + + @@ -866,6 +922,173 @@ a pattern or a String. +
    + Method Detail +
    + + +
    <static> + + + jasmine.Matchers.Any(expectedClass) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + expectedClass + +
    +
    + +
    + + + + + + + + +
    + + +
    <static> + + + jasmine.Matchers.matcherFn_(matcherName, options) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + matcherName + +
    +
    + +
    + options + +
    +
    + +
    + + + + + + + + +
    + + +
    <static> + + + jasmine.Matchers.pp(str) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + str + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + report(result, failing_message, details) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + result + +
    +
    + +
    + failing_message + +
    +
    + +
    + details + +
    +
    + +
    + + + + + + + + + + + @@ -877,7 +1100,7 @@ a pattern or a String.
    - Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:06 GMT-0500 (EST) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:30 GMT-0500 (EST)
    diff --git a/doc/symbols/jasmine.MultiReporter.html b/doc/symbols/jasmine.MultiReporter.html index 9a4e1dc..b2ead53 100644 --- a/doc/symbols/jasmine.MultiReporter.html +++ b/doc/symbols/jasmine.MultiReporter.html @@ -195,6 +195,8 @@ ul.inheritsList
  • jasmine.Block
  • +
  • jasmine.Clock
  • +
  • jasmine.Env
  • jasmine.JsApiReporter
  • @@ -269,6 +271,33 @@ ul.inheritsList + + + + + + + + + + + + + + + + + + +
    Method Summary
    Method AttributesMethod Name and Description
      +
    addReporter(reporter) +
    +
    +
    + + + + @@ -307,6 +336,47 @@ ul.inheritsList +
    + Method Detail +
    + + +
    + + + addReporter(reporter) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + reporter + +
    +
    + +
    + + + + + + + + + + + @@ -318,7 +388,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:06 GMT-0500 (EST) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:30 GMT-0500 (EST)
    diff --git a/doc/symbols/jasmine.NestedResults.html b/doc/symbols/jasmine.NestedResults.html index 139f9a3..69283a6 100644 --- a/doc/symbols/jasmine.NestedResults.html +++ b/doc/symbols/jasmine.NestedResults.html @@ -195,6 +195,8 @@ ul.inheritsList
  • jasmine.Block
  • +
  • jasmine.Clock
  • +
  • jasmine.Env
  • jasmine.JsApiReporter
  • @@ -545,7 +547,7 @@ ul.inheritsList
    Parameters:
    - {jasmine.ExpectationResult|jasmine.NestedResults} result + {jasmine.ExpectationResult|jasmine.NestedResults} result
    @@ -702,7 +704,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:30 GMT-0500 (EST)
    diff --git a/doc/symbols/jasmine.Reporter.html b/doc/symbols/jasmine.Reporter.html index ecba5b4..d035c63 100644 --- a/doc/symbols/jasmine.Reporter.html +++ b/doc/symbols/jasmine.Reporter.html @@ -195,6 +195,8 @@ ul.inheritsList
  • jasmine.Block
  • +
  • jasmine.Clock
  • +
  • jasmine.Env
  • jasmine.JsApiReporter
  • @@ -269,6 +271,69 @@ ul.inheritsList + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Method Summary
    Method AttributesMethod Name and Description
      +
    log(str) +
    +
    +
      + +
    +
      + +
    +
      + +
    +
      + +
    +
    + + + + @@ -307,6 +372,191 @@ ul.inheritsList +
    + Method Detail +
    + + +
    + + + log(str) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + str + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + reportRunnerResults(runner) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + runner + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + reportRunnerStarting(runner) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + runner + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + reportSpecResults(spec) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + spec + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + reportSuiteResults(suite) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + suite + +
    +
    + +
    + + + + + + + + + + + @@ -318,7 +568,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:30 GMT-0500 (EST)
    diff --git a/doc/symbols/jasmine.Runner.html b/doc/symbols/jasmine.Runner.html index 6e17061..c726687 100644 --- a/doc/symbols/jasmine.Runner.html +++ b/doc/symbols/jasmine.Runner.html @@ -195,6 +195,8 @@ ul.inheritsList
  • jasmine.Block
  • +
  • jasmine.Clock
  • +
  • jasmine.Env
  • jasmine.JsApiReporter
  • @@ -269,6 +271,105 @@ ul.inheritsList + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Method Summary
    Method AttributesMethod Name and Description
      +
    add(block) +
    +
    +
      +
    addSuite(suite) +
    +
    +
      +
    afterEach(afterEachFunction) +
    +
    +
      +
    beforeEach(beforeEachFunction) +
    +
    +
      +
    execute() +
    +
    +
      + +
    +
      +
    results() +
    +
    +
      +
    specs() +
    +
    +
      +
    suites() +
    +
    +
    + + + + @@ -318,6 +419,280 @@ ul.inheritsList +
    + Method Detail +
    + + +
    + + + add(block) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + block + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + addSuite(suite) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + suite + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + afterEach(afterEachFunction) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + afterEachFunction + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + beforeEach(beforeEachFunction) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + beforeEachFunction + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + execute() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    + + + finishCallback() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    + + + results() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    + + + specs() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    + + + suites() + +
    +
    + + + +
    + + + + + + + + + + + + + + @@ -329,7 +704,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:30 GMT-0500 (EST)
    diff --git a/doc/symbols/jasmine.Spec.html b/doc/symbols/jasmine.Spec.html index 1cc26ec..bc5e538 100644 --- a/doc/symbols/jasmine.Spec.html +++ b/doc/symbols/jasmine.Spec.html @@ -195,6 +195,8 @@ ul.inheritsList
  • jasmine.Block
  • +
  • jasmine.Clock
  • +
  • jasmine.Env
  • jasmine.JsApiReporter
  • @@ -281,6 +283,123 @@ ul.inheritsList + +   + +
    addBeforesAndAftersToQueue() +
    +
    + + + + +   + +
    addMatcherResult(result) +
    +
    + + + + +   + +
    addMatchers(matchersPrototype) +
    +
    + + + + +   + +
    addToQueue(block) +
    +
    + + + + +   + +
    after(doAfter, test) +
    +
    + + + + +   + +
    execute(onComplete) +
    +
    + + + + +   + +
    expect(actual) +
    +
    + + + + +   + +
    explodes() +
    +
    + + + + +   + +
    fail(e) +
    +
    + + + + +   + +
    finish(onComplete) +
    +
    + + + + +   + +
    finishCallback() +
    +
    + + + + +   + +
    getFullName() +
    +
    + + + + +   + +
    getMatchersClass_() +
    +
    + + +   @@ -290,6 +409,69 @@ ul.inheritsList + +   + +
    log(message) +
    +
    + + + + +   + +
    removeAllSpies() +
    +
    + + + + +   + +
    results() +
    +
    + + + + +   + +
    runs(func) +
    +
    + + + + +   + +
    spyOn(obj, methodName, ignoreMethodDoesntExist) +
    +
    + + + + +   + +
    waits(timeout) +
    +
    + + + + +   + +
    waitsFor(timeout, latchFunction, timeoutMessage) +
    +
    + + + @@ -361,6 +543,425 @@ ul.inheritsList Method Detail
    + +
    + + + addBeforesAndAftersToQueue() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    + + + addMatcherResult(result) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + result + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + addMatchers(matchersPrototype) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + matchersPrototype + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + addToQueue(block) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + block + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + after(doAfter, test) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + doAfter + +
    +
    + +
    + test + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + execute(onComplete) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + onComplete + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + expect(actual) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + actual + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + explodes() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    + + + fail(e) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + e + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + finish(onComplete) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + onComplete + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + finishCallback() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    + + + getFullName() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    + + + getMatchersClass_() + +
    +
    + + + +
    + + + + + + + + + + + +
    +
    @@ -384,6 +985,260 @@ ul.inheritsList +
    + + +
    + + + log(message) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + message + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + removeAllSpies() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    + + + results() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    + + + runs(func) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + func + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + spyOn(obj, methodName, ignoreMethodDoesntExist) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + obj + +
    +
    + +
    + methodName + +
    +
    + +
    + ignoreMethodDoesntExist + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + waits(timeout) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + timeout + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + waitsFor(timeout, latchFunction, timeoutMessage) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + timeout + +
    +
    + +
    + latchFunction + +
    +
    + +
    + timeoutMessage + +
    +
    + +
    + + + + + + + + @@ -398,7 +1253,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:30 GMT-0500 (EST)
    diff --git a/doc/symbols/jasmine.Spy.html b/doc/symbols/jasmine.Spy.html index 9944c65..a7f98a6 100644 --- a/doc/symbols/jasmine.Spy.html +++ b/doc/symbols/jasmine.Spy.html @@ -195,6 +195,8 @@ ul.inheritsList
  • jasmine.Block
  • +
  • jasmine.Clock
  • +
  • jasmine.Env
  • jasmine.JsApiReporter
  • @@ -380,7 +382,7 @@ ul.inheritsList
    plan()
    -
    The acutal function this spy stubs.
    +
    The actual function this spy stubs.
    @@ -781,7 +783,7 @@ spyOn(foo, 'bar').andThrow('baz');
    - The acutal function this spy stubs. + The actual function this spy stubs.
    @@ -847,7 +849,7 @@ expect(foo.bar.callCount).toEqual(0);
    - Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:30 GMT-0500 (EST)
    diff --git a/doc/symbols/jasmine.Suite.html b/doc/symbols/jasmine.Suite.html index 19a098a..898ace0 100644 --- a/doc/symbols/jasmine.Suite.html +++ b/doc/symbols/jasmine.Suite.html @@ -195,6 +195,8 @@ ul.inheritsList
  • jasmine.Block
  • +
  • jasmine.Clock
  • +
  • jasmine.Env
  • jasmine.JsApiReporter
  • @@ -269,6 +271,96 @@ ul.inheritsList + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Method Summary
    Method AttributesMethod Name and Description
      +
    add(block) +
    +
    +
      +
    afterEach(afterEachFunction) +
    +
    +
      +
    beforeEach(beforeEachFunction) +
    +
    +
      +
    execute(onComplete) +
    +
    +
      +
    finish(onComplete) +
    +
    +
      + +
    +
      +
    results() +
    +
    +
      +
    specs() +
    +
    +
    + + + + @@ -336,6 +428,266 @@ ul.inheritsList +
    + Method Detail +
    + + +
    + + + add(block) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + block + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + afterEach(afterEachFunction) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + afterEachFunction + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + beforeEach(beforeEachFunction) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + beforeEachFunction + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + execute(onComplete) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + onComplete + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + finish(onComplete) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + onComplete + +
    +
    + +
    + + + + + + + + +
    + + +
    + + + getFullName() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    + + + results() + +
    +
    + + + +
    + + + + + + + + + + + +
    + + +
    + + + specs() + +
    +
    + + + +
    + + + + + + + + + + + + + + @@ -347,7 +699,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:30 GMT-0500 (EST)
    diff --git a/doc/symbols/jasmine.html b/doc/symbols/jasmine.html index 4b0d823..14b52e6 100644 --- a/doc/symbols/jasmine.html +++ b/doc/symbols/jasmine.html @@ -195,6 +195,8 @@ ul.inheritsList
  • jasmine.Block
  • +
  • jasmine.Clock
  • +
  • jasmine.Env
  • jasmine.JsApiReporter
  • @@ -298,6 +300,17 @@ ul.inheritsList + + <static>   + +
    + jasmine.Reporters +
    +
    JasmineReporters.reporter + Base object that will get called whenever a Spec, Suite, or Runner is done.
    + + + @@ -328,6 +341,15 @@ ul.inheritsList + + <static>   + +
    jasmine.createSpy(name) +
    +
    + + + <static>   @@ -337,6 +359,24 @@ ul.inheritsList + + <static>   + +
    jasmine.ExpectationResult(params) +
    +
    + + + + + <static>   + +
    jasmine.FakeTimer() +
    +
    + + + <static>   @@ -365,6 +405,24 @@ Jasmine environment. + + <static>   + +
    jasmine.log(message) +
    +
    + + + + + <static>   + +
    jasmine.MessageResult(text) +
    +
    + + + <static>   @@ -383,6 +441,60 @@ Jasmine environment. + + <static>   + +
    jasmine.Queue(env) +
    +
    + + + + + <static>   + +
    jasmine.StringPrettyPrinter() +
    +
    + + + + + <static>   + +
    jasmine.TrivialReporter(doc) +
    +
    + + + + + <static>   + +
    jasmine.WaitsBlock(env, timeout, spec) +
    +
    + + + + + <static>   + +
    jasmine.WaitsForBlock(env, timeout, latchFunction, message, spec) +
    +
    + + + + + <static>   + +
    jasmine.XmlHttpRequest() +
    +
    + + + @@ -470,6 +582,33 @@ Jasmine environment. +
    + + +
    <static> + + + jasmine.Reporters + +
    +
    + JasmineReporters.reporter + Base object that will get called whenever a Spec, Suite, or Runner is done. It is up to + descendants of this object to do something with the results (see json_reporter.js) + +
    + Defined in: Reporters.js. + + +
    + + + + + + + + @@ -526,6 +665,42 @@ expect(mySpy).wasCalledWith(jasmine.any(Function)); +
    + + +
    <static> + + + jasmine.createSpy(name) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + name + +
    +
    + +
    + + + + + + + +
    @@ -569,6 +744,70 @@ large in one call. +
    + + +
    <static> + + + jasmine.ExpectationResult(params) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + params + +
    +
    + +
    + + + + + + + + +
    + + +
    <static> + + + jasmine.FakeTimer() + +
    +
    + + +
    + Defined in: mock-timeout.js. + + +
    + + + + + + + + + + +
    @@ -680,6 +919,78 @@ Jasmine environment. +
    + + +
    <static> + + + jasmine.log(message) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + message + +
    +
    + +
    + + + + + + + + +
    + + +
    <static> + + + jasmine.MessageResult(text) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + text + +
    +
    + +
    + + + + + + + +
    @@ -751,6 +1062,251 @@ Jasmine environment. +
    + + +
    <static> + + + jasmine.Queue(env) + +
    +
    + + +
    + Defined in: Queue.js. + + +
    + + + + +
    +
    Parameters:
    + +
    + env + +
    +
    + +
    + + + + + + + + +
    + + +
    <static> + + + jasmine.StringPrettyPrinter() + +
    +
    + + +
    + Defined in: PrettyPrinter.js. + + +
    + + + + + + + + + + + +
    + + +
    <static> + + + jasmine.TrivialReporter(doc) + +
    +
    + + +
    + Defined in: TrivialReporter.js. + + +
    + + + + +
    +
    Parameters:
    + +
    + doc + +
    +
    + +
    + + + + + + + + +
    + + +
    <static> + + + jasmine.WaitsBlock(env, timeout, spec) + +
    +
    + + +
    + Defined in: WaitsBlock.js. + + +
    + + + + +
    +
    Parameters:
    + +
    + env + +
    +
    + +
    + timeout + +
    +
    + +
    + spec + +
    +
    + +
    + + + + + + + + +
    + + +
    <static> + + + jasmine.WaitsForBlock(env, timeout, latchFunction, message, spec) + +
    +
    + + +
    + Defined in: WaitsForBlock.js. + + +
    + + + + +
    +
    Parameters:
    + +
    + env + +
    +
    + +
    + timeout + +
    +
    + +
    + latchFunction + +
    +
    + +
    + message + +
    +
    + +
    + spec + +
    +
    + +
    + + + + + + + + +
    + + +
    <static> + + + jasmine.XmlHttpRequest() + +
    +
    + + + +
    + + + + + + + + + + + @@ -765,7 +1321,7 @@ Jasmine environment.
    - Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:06 GMT-0500 (EST) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:29 GMT-0500 (EST)
    diff --git a/doc/symbols/jasmine.util.html b/doc/symbols/jasmine.util.html index d4b261b..905d878 100644 --- a/doc/symbols/jasmine.util.html +++ b/doc/symbols/jasmine.util.html @@ -195,6 +195,8 @@ ul.inheritsList
  • jasmine.Block
  • +
  • jasmine.Clock
  • +
  • jasmine.Env
  • jasmine.JsApiReporter
  • @@ -269,6 +271,60 @@ ul.inheritsList + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Method Summary
    Method AttributesMethod Name and Description
    <static>   +
    jasmine.util.argsToArray(args) +
    +
    +
    <static>   +
    jasmine.util.extend(destination, source) +
    +
    +
    <static>   +
    jasmine.util.formatException(e) +
    +
    +
    <static>   +
    jasmine.util.htmlEscape(str) +
    +
    +
    + + + + @@ -307,6 +363,161 @@ ul.inheritsList +
    + Method Detail +
    + + +
    <static> + + + jasmine.util.argsToArray(args) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + args + +
    +
    + +
    + + + + + + + + +
    + + +
    <static> + + + jasmine.util.extend(destination, source) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + destination + +
    +
    + +
    + source + +
    +
    + +
    + + + + + + + + +
    + + +
    <static> + + + jasmine.util.formatException(e) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + e + +
    +
    + +
    + + + + + + + + +
    + + +
    <static> + + + jasmine.util.htmlEscape(str) + +
    +
    + + + +
    + + + + +
    +
    Parameters:
    + +
    + str + +
    +
    + +
    + + + + + + + + + + + @@ -318,7 +529,7 @@ ul.inheritsList
    - Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 14:27:07 GMT-0500 (EST) + Documentation generated by JsDoc Toolkit 2.1.0 on Tue Nov 10 2009 17:31:30 GMT-0500 (EST)
    diff --git a/doc/symbols/src/lib_TrivialReporter.js.html b/doc/symbols/src/lib_TrivialReporter.js.html index 700119e..df0b881 100644 --- a/doc/symbols/src/lib_TrivialReporter.js.html +++ b/doc/symbols/src/lib_TrivialReporter.js.html @@ -97,35 +97,30 @@ 90 var result = resultItems[i]; 91 if (result.passed && !result.passed()) { 92 var resultMessageDiv = this.createDom('div', {className: 'resultMessage fail'}); - 93 - 94 var expectationMessage = "Expected " + jasmine.pp(result.actual) + " " + result.matcherName; - 95 if ("expected" in result) { - 96 expectationMessage += " " + jasmine.pp(result.expected); - 97 } - 98 resultMessageDiv.innerHTML = expectationMessage; // todo: lame; mend - 99 specDiv.appendChild(resultMessageDiv); -100 specDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack)); -101 } -102 } -103 this.suiteDivs[spec.suite.getFullName()].appendChild(specDiv); -104 }; -105 -106 jasmine.TrivialReporter.prototype.log = function() { -107 console.log.apply(console, arguments); -108 }; -109 -110 jasmine.TrivialReporter.prototype.getLocation = function() { -111 return this.document.location; -112 }; -113 -114 jasmine.TrivialReporter.prototype.specFilter = function(spec) { -115 var paramMap = {}; -116 var params = this.getLocation().search.substring(1).split('&'); -117 for (var i = 0; i < params.length; i++) { -118 var p = params[i].split('='); -119 paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]); -120 } -121 -122 if (!paramMap["spec"]) return true; -123 return spec.getFullName().indexOf(paramMap["spec"]) == 0; -124 }; \ No newline at end of file + 93 resultMessageDiv.innerHTML = result.message; // todo: lame; mend + 94 specDiv.appendChild(resultMessageDiv); + 95 specDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack)); + 96 } + 97 } + 98 this.suiteDivs[spec.suite.getFullName()].appendChild(specDiv); + 99 }; +100 +101 jasmine.TrivialReporter.prototype.log = function() { +102 console.log.apply(console, arguments); +103 }; +104 +105 jasmine.TrivialReporter.prototype.getLocation = function() { +106 return this.document.location; +107 }; +108 +109 jasmine.TrivialReporter.prototype.specFilter = function(spec) { +110 var paramMap = {}; +111 var params = this.getLocation().search.substring(1).split('&'); +112 for (var i = 0; i < params.length; i++) { +113 var p = params[i].split('='); +114 paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]); +115 } +116 +117 if (!paramMap["spec"]) return true; +118 return spec.getFullName().indexOf(paramMap["spec"]) == 0; +119 }; \ No newline at end of file diff --git a/doc/symbols/src/src_Reporters.js.html b/doc/symbols/src/src_Reporters.js.html index 996a8e2..9ed413c 100644 --- a/doc/symbols/src/src_Reporters.js.html +++ b/doc/symbols/src/src_Reporters.js.html @@ -5,37 +5,47 @@ .STRN {color: #393;} .REGX {color: #339;} .line {border-right: 1px dotted #666; color: #666; font-style: normal;} -
      1 /* JasmineReporters.reporter
    +	
      1 /** JasmineReporters.reporter
       2  *    Base object that will get called whenever a Spec, Suite, or Runner is done.  It is up to
       3  *    descendants of this object to do something with the results (see json_reporter.js)
    -  4  */
    -  5 jasmine.Reporters = {};
    -  6 
    -  7 jasmine.Reporters.reporter = function(callbacks) {
    -  8   var that = {
    -  9     callbacks: callbacks || {},
    - 10 
    - 11     doCallback: function(callback, results) {
    - 12       if (callback) {
    - 13         callback(results);
    - 14       }
    - 15     },
    - 16 
    - 17     reportRunnerResults: function(runner) {
    - 18       that.doCallback(that.callbacks.runnerCallback, runner);
    - 19     },
    - 20     reportSuiteResults:  function(suite) {
    - 21       that.doCallback(that.callbacks.suiteCallback, suite);
    - 22     },
    - 23     reportSpecResults:   function(spec) {
    - 24       that.doCallback(that.callbacks.specCallback, spec);
    +  4  *
    +  5  * @deprecated
    +  6  */
    +  7 jasmine.Reporters = {};
    +  8 
    +  9 /**
    + 10  * @deprecated
    + 11  * @param callbacks
    + 12  */
    + 13 jasmine.Reporters.reporter = function(callbacks) {
    + 14   /**
    + 15    * @deprecated
    + 16    * @param callbacks
    + 17    */
    + 18   var that = {
    + 19     callbacks: callbacks || {},
    + 20 
    + 21     doCallback: function(callback, results) {
    + 22       if (callback) {
    + 23         callback(results);
    + 24       }
      25     },
    - 26     log: function (str) {
    - 27       if (console && console.log) console.log(str);
    - 28     }
    - 29   };
    - 30 
    - 31   return that;
    - 32 };
    - 33 
    - 34 
    \ No newline at end of file + 26 + 27
    reportRunnerResults: function(runner) { + 28 that.doCallback(that.callbacks.runnerCallback, runner); + 29 }, + 30 reportSuiteResults: function(suite) { + 31 that.doCallback(that.callbacks.suiteCallback, suite); + 32 }, + 33 reportSpecResults: function(spec) { + 34 that.doCallback(that.callbacks.specCallback, spec); + 35 }, + 36 log: function (str) { + 37 if (console && console.log) console.log(str); + 38 } + 39 }; + 40 + 41 return that; + 42 }; + 43 + 44
    \ No newline at end of file diff --git a/doc/symbols/src/src_base.js.html b/doc/symbols/src/src_base.js.html index 38cfeb7..1b48e2c 100644 --- a/doc/symbols/src/src_base.js.html +++ b/doc/symbols/src/src_base.js.html @@ -184,7 +184,7 @@ 177 */ 178 this.isSpy = true; 179 /** -180 * The acutal function this spy stubs. +180 * The actual function this spy stubs. 181 */ 182 this.plan = function() { 183 }; diff --git a/doc/symbols/src/src_mock-timeout.js.html b/doc/symbols/src/src_mock-timeout.js.html index 787dd6b..48e5382 100644 --- a/doc/symbols/src/src_mock-timeout.js.html +++ b/doc/symbols/src/src_mock-timeout.js.html @@ -92,92 +92,94 @@ 85 }; 86 }; 87 - 88 - 89 jasmine.Clock = { - 90 defaultFakeTimer: new jasmine.FakeTimer(), - 91 - 92 reset: function() { - 93 jasmine.Clock.assertInstalled(); - 94 jasmine.Clock.defaultFakeTimer.reset(); - 95 }, - 96 - 97 tick: function(millis) { - 98 jasmine.Clock.assertInstalled(); - 99 jasmine.Clock.defaultFakeTimer.tick(millis); -100 }, -101 -102 runFunctionsWithinRange: function(oldMillis, nowMillis) { -103 jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange(oldMillis, nowMillis); -104 }, -105 -106 scheduleFunction: function(timeoutKey, funcToCall, millis, recurring) { -107 jasmine.Clock.defaultFakeTimer.scheduleFunction(timeoutKey, funcToCall, millis, recurring); -108 }, -109 -110 useMock: function() { -111 var spec = jasmine.getEnv().currentSpec; -112 spec.after(jasmine.Clock.uninstallMock); -113 -114 jasmine.Clock.installMock(); -115 }, -116 -117 installMock: function() { -118 jasmine.Clock.installed = jasmine.Clock.defaultFakeTimer; -119 }, -120 -121 uninstallMock: function() { -122 jasmine.Clock.assertInstalled(); -123 jasmine.Clock.installed = jasmine.Clock.real; -124 }, -125 -126 real: { -127 setTimeout: window.setTimeout, -128 clearTimeout: window.clearTimeout, -129 setInterval: window.setInterval, -130 clearInterval: window.clearInterval -131 }, -132 -133 assertInstalled: function() { -134 if (jasmine.Clock.installed != jasmine.Clock.defaultFakeTimer) { -135 throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()"); -136 } -137 }, -138 -139 installed: null -140 }; -141 jasmine.Clock.installed = jasmine.Clock.real; -142 -143 //else for IE support -144 window.setTimeout = function(funcToCall, millis) { -145 if (jasmine.Clock.installed.setTimeout.apply) { -146 return jasmine.Clock.installed.setTimeout.apply(this, arguments); -147 } else { -148 return jasmine.Clock.installed.setTimeout(funcToCall, millis); -149 } -150 }; -151 -152 window.setInterval = function(funcToCall, millis) { -153 if (jasmine.Clock.installed.setInterval.apply) { -154 return jasmine.Clock.installed.setInterval.apply(this, arguments); -155 } else { -156 return jasmine.Clock.installed.setInterval(funcToCall, millis); -157 } -158 }; -159 -160 window.clearTimeout = function(timeoutKey) { -161 if (jasmine.Clock.installed.clearTimeout.apply) { -162 return jasmine.Clock.installed.clearTimeout.apply(this, arguments); -163 } else { -164 return jasmine.Clock.installed.clearTimeout(timeoutKey); -165 } -166 }; -167 -168 window.clearInterval = function(timeoutKey) { -169 if (jasmine.Clock.installed.clearTimeout.apply) { -170 return jasmine.Clock.installed.clearInterval.apply(this, arguments); -171 } else { -172 return jasmine.Clock.installed.clearInterval(timeoutKey); -173 } -174 }; -175 -176 \ No newline at end of file + 88 /** + 89 * @namespace + 90 */ + 91 jasmine.Clock = { + 92 defaultFakeTimer: new jasmine.FakeTimer(), + 93 + 94 reset: function() { + 95 jasmine.Clock.assertInstalled(); + 96 jasmine.Clock.defaultFakeTimer.reset(); + 97 }, + 98 + 99 tick: function(millis) { +100 jasmine.Clock.assertInstalled(); +101 jasmine.Clock.defaultFakeTimer.tick(millis); +102 }, +103 +104 runFunctionsWithinRange: function(oldMillis, nowMillis) { +105 jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange(oldMillis, nowMillis); +106 }, +107 +108 scheduleFunction: function(timeoutKey, funcToCall, millis, recurring) { +109 jasmine.Clock.defaultFakeTimer.scheduleFunction(timeoutKey, funcToCall, millis, recurring); +110 }, +111 +112 useMock: function() { +113 var spec = jasmine.getEnv().currentSpec; +114 spec.after(jasmine.Clock.uninstallMock); +115 +116 jasmine.Clock.installMock(); +117 }, +118 +119 installMock: function() { +120 jasmine.Clock.installed = jasmine.Clock.defaultFakeTimer; +121 }, +122 +123 uninstallMock: function() { +124 jasmine.Clock.assertInstalled(); +125 jasmine.Clock.installed = jasmine.Clock.real; +126 }, +127 +128 real: { +129 setTimeout: window.setTimeout, +130 clearTimeout: window.clearTimeout, +131 setInterval: window.setInterval, +132 clearInterval: window.clearInterval +133 }, +134 +135 assertInstalled: function() { +136 if (jasmine.Clock.installed != jasmine.Clock.defaultFakeTimer) { +137 throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()"); +138 } +139 }, +140 +141 installed: null +142 }; +143 jasmine.Clock.installed = jasmine.Clock.real; +144 +145 //else for IE support +146 window.setTimeout = function(funcToCall, millis) { +147 if (jasmine.Clock.installed.setTimeout.apply) { +148 return jasmine.Clock.installed.setTimeout.apply(this, arguments); +149 } else { +150 return jasmine.Clock.installed.setTimeout(funcToCall, millis); +151 } +152 }; +153 +154 window.setInterval = function(funcToCall, millis) { +155 if (jasmine.Clock.installed.setInterval.apply) { +156 return jasmine.Clock.installed.setInterval.apply(this, arguments); +157 } else { +158 return jasmine.Clock.installed.setInterval(funcToCall, millis); +159 } +160 }; +161 +162 window.clearTimeout = function(timeoutKey) { +163 if (jasmine.Clock.installed.clearTimeout.apply) { +164 return jasmine.Clock.installed.clearTimeout.apply(this, arguments); +165 } else { +166 return jasmine.Clock.installed.clearTimeout(timeoutKey); +167 } +168 }; +169 +170 window.clearInterval = function(timeoutKey) { +171 if (jasmine.Clock.installed.clearTimeout.apply) { +172 return jasmine.Clock.installed.clearInterval.apply(this, arguments); +173 } else { +174 return jasmine.Clock.installed.clearInterval(timeoutKey); +175 } +176 }; +177 +178 \ No newline at end of file diff --git a/doc/symbols/src/src_util.js.html b/doc/symbols/src/src_util.js.html index 0de8457..31f3e27 100644 --- a/doc/symbols/src/src_util.js.html +++ b/doc/symbols/src/src_util.js.html @@ -11,62 +11,65 @@ 4 jasmine.util = {}; 5 6 /** - 7 * Declare that a child class inherite it's prototype from the parent class. + 7 * Declare that a child class inherit it's prototype from the parent class. 8 * 9 * @private 10 * @param {Function} childClass 11 * @param {Function} parentClass 12 */ 13 jasmine.util.inherit = function(childClass, parentClass) { - 14 var subclass = function() { - 15 }; - 16 subclass.prototype = parentClass.prototype; - 17 childClass.prototype = new subclass; - 18 }; - 19 - 20 jasmine.util.formatException = function(e) { - 21 var lineNumber; - 22 if (e.line) { - 23 lineNumber = e.line; - 24 } - 25 else if (e.lineNumber) { - 26 lineNumber = e.lineNumber; + 14 /** + 15 * @private + 16 */ + 17 var subclass = function() { + 18 }; + 19 subclass.prototype = parentClass.prototype; + 20 childClass.prototype = new subclass; + 21 }; + 22 + 23 jasmine.util.formatException = function(e) { + 24 var lineNumber; + 25 if (e.line) { + 26 lineNumber = e.line; 27 } - 28 - 29 var file; - 30 - 31 if (e.sourceURL) { - 32 file = e.sourceURL; - 33 } - 34 else if (e.fileName) { - 35 file = e.fileName; + 28 else if (e.lineNumber) { + 29 lineNumber = e.lineNumber; + 30 } + 31 + 32 var file; + 33 + 34 if (e.sourceURL) { + 35 file = e.sourceURL; 36 } - 37 - 38 var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString(); - 39 - 40 if (file && lineNumber) { - 41 message += ' in ' + file + ' (line ' + lineNumber + ')'; - 42 } - 43 - 44 return message; - 45 }; + 37 else if (e.fileName) { + 38 file = e.fileName; + 39 } + 40 + 41 var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString(); + 42 + 43 if (file && lineNumber) { + 44 message += ' in ' + file + ' (line ' + lineNumber + ')'; + 45 } 46 - 47 jasmine.util.htmlEscape = function(str) { - 48 if (!str) return str; - 49 return str.replace(/&/g, '&') - 50 .replace(/</g, '<') - 51 .replace(/>/g, '>'); - 52 }; - 53 - 54 jasmine.util.argsToArray = function(args) { - 55 var arrayOfArgs = []; - 56 for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]); - 57 return arrayOfArgs; - 58 }; - 59 - 60 jasmine.util.extend = function(destination, source) { - 61 for (var property in source) destination[property] = source[property]; - 62 return destination; - 63 }; - 64 - 65 \ No newline at end of file + 47 return message; + 48 }; + 49 + 50 jasmine.util.htmlEscape = function(str) { + 51 if (!str) return str; + 52 return str.replace(/&/g, '&') + 53 .replace(/</g, '<') + 54 .replace(/>/g, '>'); + 55 }; + 56 + 57 jasmine.util.argsToArray = function(args) { + 58 var arrayOfArgs = []; + 59 for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]); + 60 return arrayOfArgs; + 61 }; + 62 + 63 jasmine.util.extend = function(destination, source) { + 64 for (var property in source) destination[property] = source[property]; + 65 return destination; + 66 }; + 67 + 68 \ No newline at end of file diff --git a/src/Reporters.js b/src/Reporters.js index 066ac64..dcd4be4 100644 --- a/src/Reporters.js +++ b/src/Reporters.js @@ -1,10 +1,20 @@ -/* JasmineReporters.reporter +/** JasmineReporters.reporter * Base object that will get called whenever a Spec, Suite, or Runner is done. It is up to * descendants of this object to do something with the results (see json_reporter.js) + * + * @deprecated */ jasmine.Reporters = {}; +/** + * @deprecated + * @param callbacks + */ jasmine.Reporters.reporter = function(callbacks) { + /** + * @deprecated + * @param callbacks + */ var that = { callbacks: callbacks || {}, diff --git a/src/base.js b/src/base.js index 24eed8b..2f2e8e3 100755 --- a/src/base.js +++ b/src/base.js @@ -177,7 +177,7 @@ jasmine.Spy = function(name) { */ this.isSpy = true; /** - * The acutal function this spy stubs. + * The actual function this spy stubs. */ this.plan = function() { }; diff --git a/src/mock-timeout.js b/src/mock-timeout.js index bec43ee..d3a0ad5 100755 --- a/src/mock-timeout.js +++ b/src/mock-timeout.js @@ -85,7 +85,9 @@ jasmine.FakeTimer.prototype.scheduleFunction = function(timeoutKey, funcToCall, }; }; - +/** + * @namespace + */ jasmine.Clock = { defaultFakeTimer: new jasmine.FakeTimer(), diff --git a/src/util.js b/src/util.js index 155b496..f5d453a 100644 --- a/src/util.js +++ b/src/util.js @@ -4,13 +4,16 @@ jasmine.util = {}; /** - * Declare that a child class inherite it's prototype from the parent class. + * Declare that a child class inherit it's prototype from the parent class. * * @private * @param {Function} childClass * @param {Function} parentClass */ jasmine.util.inherit = function(childClass, parentClass) { + /** + * @private + */ var subclass = function() { }; subclass.prototype = parentClass.prototype;