Improved jsdocs for user-specified spec/suite properties

This commit is contained in:
Steve Gravrock
2020-05-05 17:58:16 -07:00
parent 7416c176a7
commit 8a731e17a7
4 changed files with 36 additions and 4 deletions

View File

@@ -1124,6 +1124,14 @@ getJasmineRequireObj().Env = function(j$) {
return spec;
};
/**
* Sets a user-defined property that will be provided to reporters as part of {@link SpecResult#properties}
* @name Env#setSpecProperty
* @since 3.6.0
* @function
* @param {String} key The name of the property
* @param {*} value The value of the property
*/
this.setSpecProperty = function(key, value) {
if (!currentRunnable() || currentRunnable() == currentSuite()) {
throw new Error(
@@ -1133,6 +1141,14 @@ getJasmineRequireObj().Env = function(j$) {
currentRunnable().setSpecProperty(key, value);
};
/**
* Sets a user-defined property that will be provided to reporters as part of {@link SuiteResult#properties}
* @name Env#setSuiteProperty
* @since 3.6.0
* @function
* @param {String} key The name of the property
* @param {*} value The value of the property
*/
this.setSuiteProperty = function(key, value) {
if (!currentSuite()) {
throw new Error(