Update jsDocs to something close to full coverage for public API

- #596
This commit is contained in:
Gregg Van Hove
2017-03-23 12:20:08 -07:00
parent 9cb2f06aa6
commit 7f8f2b5e7a
5 changed files with 709 additions and 14 deletions

View File

@@ -36,8 +36,10 @@ getJasmineRequireObj().JsApiReporter = function() {
};
/**
* Get the current status for the Jasmine environment.
* @name jsApiReporter#status
* @function
* @return {String} - One of `loaded`, `started`, or `done`
*/
this.status = function() {
return status;
@@ -55,8 +57,14 @@ getJasmineRequireObj().JsApiReporter = function() {
};
/**
* Get the results for a set of suites.
*
* Retrievable in slices for easier serialization.
* @name jsApiReporter#suiteResults
* @function
* @param {Number} index - The position in the suites list to start from.
* @param {Number} length - Maximum number of suite results to return.
* @return {Object[]}
*/
this.suiteResults = function(index, length) {
return suites.slice(index, index + length);
@@ -67,6 +75,12 @@ getJasmineRequireObj().JsApiReporter = function() {
suites_hash[result.id] = result;
}
/**
* Get all of the suites in a single object, with their `id` as the key.
* @name jsApiReporter#suites
* @function
* @return {Object}
*/
this.suites = function() {
return suites_hash;
};
@@ -77,14 +91,36 @@ getJasmineRequireObj().JsApiReporter = function() {
specs.push(result);
};
/**
* Get the results for a set of specs.
*
* Retrievable in slices for easier serialization.
* @name jsApiReporter#specResults
* @function
* @param {Number} index - The position in the specs list to start from.
* @param {Number} length - Maximum number of specs results to return.
* @return {Object[]}
*/
this.specResults = function(index, length) {
return specs.slice(index, index + length);
};
/**
* Get all spec results.
* @name jsApiReporter#specs
* @function
* @return {Object[]}
*/
this.specs = function() {
return specs;
};
/**
* Get the number of milliseconds it took for the full Jasmine suite to run.
* @name jsApiReporter#executionTime
* @function
* @return {Number}
*/
this.executionTime = function() {
return executionTime;
};