diff options
| author | Misko Hevery | 2011-11-09 21:18:34 -0800 |
|---|---|---|
| committer | Misko Hevery | 2011-11-14 20:31:16 -0800 |
| commit | f0fa5e63762e80fd4ee60ff6d365fca5f886292a (patch) | |
| tree | 7c294714922118c49ec5f37bcd8b2733f13d1e7d /src/scenario | |
| parent | c283bf6035566aa8ff3178676a133de6878b5d1b (diff) | |
| download | angular.js-f0fa5e63762e80fd4ee60ff6d365fca5f886292a.tar.bz2 | |
doc(AUTO, NG_MOCK): Documenting the AUTO and NG_MOCK module
Diffstat (limited to 'src/scenario')
| -rw-r--r-- | src/scenario/Application.js | 6 | ||||
| -rw-r--r-- | src/scenario/Describe.js | 12 | ||||
| -rw-r--r-- | src/scenario/Future.js | 8 | ||||
| -rw-r--r-- | src/scenario/ObjectModel.js | 2 | ||||
| -rw-r--r-- | src/scenario/Runner.js | 12 | ||||
| -rw-r--r-- | src/scenario/Scenario.js | 10 | ||||
| -rw-r--r-- | src/scenario/SpecRunner.js | 10 | ||||
| -rw-r--r-- | src/scenario/output/Html.js | 2 |
8 files changed, 31 insertions, 31 deletions
diff --git a/src/scenario/Application.js b/src/scenario/Application.js index e255041b..f4f4b974 100644 --- a/src/scenario/Application.js +++ b/src/scenario/Application.js @@ -44,8 +44,8 @@ angular.scenario.Application.prototype.getWindow_ = function() { * * @param {string} url The URL. If it begins with a # then only the * hash of the page is changed. - * @param {Function} loadFn function($window, $document) Called when frame loads. - * @param {Function} errorFn function(error) Called if any error when loading. + * @param {function()} loadFn function($window, $document) Called when frame loads. + * @param {function()} errorFn function(error) Called if any error when loading. */ angular.scenario.Application.prototype.navigateTo = function(url, loadFn, errorFn) { var self = this; @@ -78,7 +78,7 @@ angular.scenario.Application.prototype.navigateTo = function(url, loadFn, errorF * Executes a function in the context of the tested application. Will wait * for all pending angular xhr requests before executing. * - * @param {Function} action The callback to execute. function($window, $document) + * @param {function()} action The callback to execute. function($window, $document) * $document is a jQuery wrapped document. */ angular.scenario.Application.prototype.executeAction = function(action) { diff --git a/src/scenario/Describe.js b/src/scenario/Describe.js index 45a5aa63..4d52e9d5 100644 --- a/src/scenario/Describe.js +++ b/src/scenario/Describe.js @@ -45,7 +45,7 @@ angular.scenario.Describe.specId = 0; /** * Defines a block to execute before each it or nested describe. * - * @param {Function} body Body of the block. + * @param {function()} body Body of the block. */ angular.scenario.Describe.prototype.beforeEach = function(body) { this.beforeEachFns.push(body); @@ -54,7 +54,7 @@ angular.scenario.Describe.prototype.beforeEach = function(body) { /** * Defines a block to execute after each it or nested describe. * - * @param {Function} body Body of the block. + * @param {function()} body Body of the block. */ angular.scenario.Describe.prototype.afterEach = function(body) { this.afterEachFns.push(body); @@ -64,7 +64,7 @@ angular.scenario.Describe.prototype.afterEach = function(body) { * Creates a new describe block that's a child of this one. * * @param {string} name Name of the block. Appended to the parent block's name. - * @param {Function} body Body of the block. + * @param {function()} body Body of the block. */ angular.scenario.Describe.prototype.describe = function(name, body) { var child = new angular.scenario.Describe(name, this); @@ -76,7 +76,7 @@ angular.scenario.Describe.prototype.describe = function(name, body) { * Same as describe() but makes ddescribe blocks the only to run. * * @param {string} name Name of the test. - * @param {Function} body Body of the block. + * @param {function()} body Body of the block. */ angular.scenario.Describe.prototype.ddescribe = function(name, body) { var child = new angular.scenario.Describe(name, this); @@ -94,7 +94,7 @@ angular.scenario.Describe.prototype.xdescribe = angular.noop; * Defines a test. * * @param {string} name Name of the test. - * @param {Function} vody Body of the block. + * @param {function()} vody Body of the block. */ angular.scenario.Describe.prototype.it = function(name, body) { this.its.push({ @@ -112,7 +112,7 @@ angular.scenario.Describe.prototype.it = function(name, body) { * Same as it() but makes iit tests the only test to run. * * @param {string} name Name of the test. - * @param {Function} body Body of the block. + * @param {function()} body Body of the block. */ angular.scenario.Describe.prototype.iit = function(name, body) { this.it.apply(this, arguments); diff --git a/src/scenario/Future.js b/src/scenario/Future.js index 598731fa..335dd2bb 100644 --- a/src/scenario/Future.js +++ b/src/scenario/Future.js @@ -4,8 +4,8 @@ * A future action in a spec. * * @param {string} name of the future action - * @param {Function} future callback(error, result) - * @param {Function} Optional. function that returns the file/line number. + * @param {function()} future callback(error, result) + * @param {function()} Optional. function that returns the file/line number. */ angular.scenario.Future = function(name, behavior, line) { this.name = name; @@ -19,7 +19,7 @@ angular.scenario.Future = function(name, behavior, line) { /** * Executes the behavior of the closure. * - * @param {Function} doneFn Callback function(error, result) + * @param {function()} doneFn Callback function(error, result) */ angular.scenario.Future.prototype.execute = function(doneFn) { var self = this; @@ -40,7 +40,7 @@ angular.scenario.Future.prototype.execute = function(doneFn) { /** * Configures the future to convert it's final with a function fn(value) * - * @param {Function} fn function(value) that returns the parsed value + * @param {function()} fn function(value) that returns the parsed value */ angular.scenario.Future.prototype.parsedWith = function(fn) { this.parser = fn; diff --git a/src/scenario/ObjectModel.js b/src/scenario/ObjectModel.js index 76e0201a..b4dad1a5 100644 --- a/src/scenario/ObjectModel.js +++ b/src/scenario/ObjectModel.js @@ -121,7 +121,7 @@ angular.scenario.ObjectModel = function(runner) { * Adds a listener for an event. * * @param {string} eventName Name of the event to add a handler for - * @param {Function} listener Function that will be called when event is fired + * @param {function()} listener Function that will be called when event is fired */ angular.scenario.ObjectModel.prototype.on = function(eventName, listener) { eventName = eventName.toLowerCase(); diff --git a/src/scenario/Runner.js b/src/scenario/Runner.js index fba076a8..d71236bd 100644 --- a/src/scenario/Runner.js +++ b/src/scenario/Runner.js @@ -61,7 +61,7 @@ angular.scenario.Runner.prototype.on = function(eventName, listener) { * @see Describe.js * * @param {string} name Name of the block - * @param {Function} body Body of the block + * @param {function()} body Body of the block */ angular.scenario.Runner.prototype.describe = function(name, body) { var self = this; @@ -82,7 +82,7 @@ angular.scenario.Runner.prototype.describe = function(name, body) { * @see Describe.js * * @param {string} name Name of the block - * @param {Function} body Body of the block + * @param {function()} body Body of the block */ angular.scenario.Runner.prototype.ddescribe = function(name, body) { var self = this; @@ -103,7 +103,7 @@ angular.scenario.Runner.prototype.ddescribe = function(name, body) { * @see Describe.js * * @param {string} name Name of the block - * @param {Function} body Body of the block + * @param {function()} body Body of the block */ angular.scenario.Runner.prototype.it = function(name, body) { this.currentDescribe.it(name, body); @@ -115,7 +115,7 @@ angular.scenario.Runner.prototype.it = function(name, body) { * @see Describe.js * * @param {string} name Name of the block - * @param {Function} body Body of the block + * @param {function()} body Body of the block */ angular.scenario.Runner.prototype.iit = function(name, body) { this.currentDescribe.iit(name, body); @@ -127,7 +127,7 @@ angular.scenario.Runner.prototype.iit = function(name, body) { * * @see Describe.js * - * @param {Function} Callback to execute + * @param {function()} Callback to execute */ angular.scenario.Runner.prototype.beforeEach = function(body) { this.currentDescribe.beforeEach(body); @@ -139,7 +139,7 @@ angular.scenario.Runner.prototype.beforeEach = function(body) { * * @see Describe.js * - * @param {Function} Callback to execute + * @param {function()} Callback to execute */ angular.scenario.Runner.prototype.afterEach = function(body) { this.currentDescribe.afterEach(body); diff --git a/src/scenario/Scenario.js b/src/scenario/Scenario.js index 0df74dae..a7979342 100644 --- a/src/scenario/Scenario.js +++ b/src/scenario/Scenario.js @@ -13,7 +13,7 @@ angular.scenario = angular.scenario || {}; * Defines a new output format. * * @param {string} name the name of the new output format - * @param {Function} fn function(context, runner) that generates the output + * @param {function()} fn function(context, runner) that generates the output */ angular.scenario.output = angular.scenario.output || function(name, fn) { angular.scenario.output[name] = fn; @@ -29,7 +29,7 @@ angular.scenario.output = angular.scenario.output || function(name, fn) { * functions. * * @param {string} name The name of the statement - * @param {Function} fn Factory function(), return a function for + * @param {function()} fn Factory function(), return a function for * the statement. */ angular.scenario.dsl = angular.scenario.dsl || function(name, fn) { @@ -65,7 +65,7 @@ angular.scenario.dsl = angular.scenario.dsl || function(name, fn) { * created for you. * * @param {string} name The name of the matcher - * @param {Function} fn The matching function(expected). + * @param {function()} fn The matching function(expected). */ angular.scenario.matcher = angular.scenario.matcher || function(name, fn) { angular.scenario.matcher[name] = function(expected) { @@ -148,8 +148,8 @@ angular.scenario.setUpAndRun = function(config) { * continueFunction to continute iterating. * * @param {Array} list list to iterate over - * @param {Function} iterator Callback function(value, continueFunction) - * @param {Function} done Callback function(error, result) called when + * @param {function()} iterator Callback function(value, continueFunction) + * @param {function()} done Callback function(error, result) called when * iteration finishes or an error occurs. */ function asyncForEach(list, iterator, done) { diff --git a/src/scenario/SpecRunner.js b/src/scenario/SpecRunner.js index 0d6274a4..eacf13a8 100644 --- a/src/scenario/SpecRunner.js +++ b/src/scenario/SpecRunner.js @@ -18,7 +18,7 @@ angular.scenario.SpecRunner = function() { * based on the describe nesting. * * @param {Object} spec A spec object - * @param {Function} specDone function that is called when the spec finshes. Function(error, index) + * @param {function()} specDone function that is called when the spec finshes. Function(error, index) */ angular.scenario.SpecRunner.prototype.run = function(spec, specDone) { var self = this; @@ -85,8 +85,8 @@ angular.scenario.SpecRunner.prototype.run = function(spec, specDone) { * Note: Do not pass line manually. It happens automatically. * * @param {string} name Name of the future - * @param {Function} behavior Behavior of the future - * @param {Function} line fn() that returns file/line number + * @param {function()} behavior Behavior of the future + * @param {function()} line fn() that returns file/line number */ angular.scenario.SpecRunner.prototype.addFuture = function(name, behavior, line) { var future = new angular.scenario.Future(name, angular.bind(this, behavior), line); @@ -100,8 +100,8 @@ angular.scenario.SpecRunner.prototype.addFuture = function(name, behavior, line) * Note: Do not pass line manually. It happens automatically. * * @param {string} name Name of the future - * @param {Function} behavior Behavior of the future - * @param {Function} line fn() that returns file/line number + * @param {function()} behavior Behavior of the future + * @param {function()} line fn() that returns file/line number */ angular.scenario.SpecRunner.prototype.addFutureAction = function(name, behavior, line) { var self = this; diff --git a/src/scenario/output/Html.js b/src/scenario/output/Html.js index 1c2216b5..326928d8 100644 --- a/src/scenario/output/Html.js +++ b/src/scenario/output/Html.js @@ -160,7 +160,7 @@ angular.scenario.output('html', function(context, runner, model) { * Add an error to a step. * * @param {Object} The JQuery wrapped context - * @param {Function} fn() that should return the file/line number of the error + * @param {function()} fn() that should return the file/line number of the error * @param {Object} the error. */ function addError(context, line, error) { |
