Added missing @since annotations

This commit is contained in:
Steve Gravrock
2021-09-23 13:38:52 -07:00
parent be29aa95eb
commit 1f318c3c93
8 changed files with 38 additions and 2 deletions

View File

@@ -492,6 +492,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get an {@link AsymmetricEqualityTester}, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}), * Get an {@link AsymmetricEqualityTester}, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value is a `String` that contains the specified `String`. * that will succeed if the actual value is a `String` that contains the specified `String`.
* @name jasmine.stringContaining * @name jasmine.stringContaining
* @since 3.10.0
* @function * @function
* @param {String} expected * @param {String} expected
*/ */
@@ -719,6 +720,7 @@ getJasmineRequireObj().Spec = function(j$) {
/** /**
* @interface Spec * @interface Spec
* @see Configuration#specFilter * @see Configuration#specFilter
* @since 2.0.0
*/ */
function Spec(attrs) { function Spec(attrs) {
this.expectationFactory = attrs.expectationFactory; this.expectationFactory = attrs.expectationFactory;
@@ -729,6 +731,7 @@ getJasmineRequireObj().Spec = function(j$) {
* @name Spec#id * @name Spec#id
* @readonly * @readonly
* @type {string} * @type {string}
* @since 2.0.0
*/ */
this.id = attrs.id; this.id = attrs.id;
/** /**
@@ -736,6 +739,7 @@ getJasmineRequireObj().Spec = function(j$) {
* @name Spec#description * @name Spec#description
* @readonly * @readonly
* @type {string} * @type {string}
* @since 2.0.0
*/ */
this.description = attrs.description || ''; this.description = attrs.description || '';
this.queueableFn = attrs.queueableFn; this.queueableFn = attrs.queueableFn;
@@ -782,7 +786,8 @@ getJasmineRequireObj().Spec = function(j$) {
* @property {String} status - Once the spec has completed, this string represents the pass/fail status of this spec. * @property {String} status - Once the spec has completed, this string represents the pass/fail status of this spec.
* @property {number} duration - The time in ms used by the spec execution, including any before/afterEach. * @property {number} duration - The time in ms used by the spec execution, including any before/afterEach.
* @property {Object} properties - User-supplied properties, if any, that were set using {@link Env#setSpecProperty} * @property {Object} properties - User-supplied properties, if any, that were set using {@link Env#setSpecProperty}
*/ * @since 2.0.0
x */
this.result = { this.result = {
id: this.id, id: this.id,
description: this.description, description: this.description,
@@ -933,6 +938,7 @@ getJasmineRequireObj().Spec = function(j$) {
* @name Spec#getFullName * @name Spec#getFullName
* @function * @function
* @returns {string} * @returns {string}
* @since 2.0.0
*/ */
Spec.prototype.getFullName = function() { Spec.prototype.getFullName = function() {
return this.getSpecName(this); return this.getSpecName(this);
@@ -1734,6 +1740,7 @@ getJasmineRequireObj().Env = function(j$) {
* @function * @function
* @name Env#topSuite * @name Env#topSuite
* @return {Suite} the root suite * @return {Suite} the root suite
* @since 2.0.0
*/ */
this.topSuite = function() { this.topSuite = function() {
return topSuite; return topSuite;
@@ -1925,6 +1932,7 @@ getJasmineRequireObj().Env = function(j$) {
* @typedef JasmineStartedInfo * @typedef JasmineStartedInfo
* @property {Int} totalSpecsDefined - The total number of specs defined in this suite. * @property {Int} totalSpecsDefined - The total number of specs defined in this suite.
* @property {Order} order - Information about the ordering (random or not) of this execution of the suite. * @property {Order} order - Information about the ordering (random or not) of this execution of the suite.
* @since 2.0.0
*/ */
reporter.jasmineStarted( reporter.jasmineStarted(
{ {
@@ -1963,6 +1971,7 @@ getJasmineRequireObj().Env = function(j$) {
* @property {Order} order - Information about the ordering (random or not) of this execution of the suite. * @property {Order} order - Information about the ordering (random or not) of this execution of the suite.
* @property {Expectation[]} failedExpectations - List of expectations that failed in an {@link afterAll} at the global level. * @property {Expectation[]} failedExpectations - List of expectations that failed in an {@link afterAll} at the global level.
* @property {Expectation[]} deprecationWarnings - List of deprecation warnings that occurred at the global level. * @property {Expectation[]} deprecationWarnings - List of deprecation warnings that occurred at the global level.
* @since 2.4.0
*/ */
reporter.jasmineDone( reporter.jasmineDone(
{ {
@@ -3159,6 +3168,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/** /**
* Get the "this" object that was passed to a specific invocation of this spy. * Get the "this" object that was passed to a specific invocation of this spy.
* @name Spy#calls#thisFor * @name Spy#calls#thisFor
* @since 3.8.0
* @function * @function
* @param {Integer} index The 0-based invocation index. * @param {Integer} index The 0-based invocation index.
* @return {Object?} * @return {Object?}
@@ -3320,6 +3330,7 @@ getJasmineRequireObj().Clock = function() {
/** /**
* @class Clock * @class Clock
* @since 1.3.0
* @classdesc Jasmine's mock clock is used when testing time dependent code.<br> * @classdesc Jasmine's mock clock is used when testing time dependent code.<br>
* _Note:_ Do not construct this directly. You can get the current clock with * _Note:_ Do not construct this directly. You can get the current clock with
* {@link jasmine.clock}. * {@link jasmine.clock}.
@@ -3962,6 +3973,7 @@ getJasmineRequireObj().Expectation = function(j$) {
* Otherwise evaluate the matcher. * Otherwise evaluate the matcher.
* @member * @member
* @name async-matchers#already * @name async-matchers#already
* @since 3.8.0
* @type {async-matchers} * @type {async-matchers}
* @example * @example
* await expectAsync(myPromise).already.toBeResolved(); * await expectAsync(myPromise).already.toBeResolved();
@@ -9403,6 +9415,7 @@ getJasmineRequireObj().Suite = function(j$) {
/** /**
* @interface Suite * @interface Suite
* @see Env#topSuite * @see Env#topSuite
* @since 2.0.0
*/ */
function Suite(attrs) { function Suite(attrs) {
this.env = attrs.env; this.env = attrs.env;
@@ -9411,6 +9424,7 @@ getJasmineRequireObj().Suite = function(j$) {
* @name Suite#id * @name Suite#id
* @readonly * @readonly
* @type {string} * @type {string}
* @since 2.0.0
*/ */
this.id = attrs.id; this.id = attrs.id;
/** /**
@@ -9425,6 +9439,7 @@ getJasmineRequireObj().Suite = function(j$) {
* @name Suite#description * @name Suite#description
* @readonly * @readonly
* @type {string} * @type {string}
* @since 2.0.0
*/ */
this.description = attrs.description; this.description = attrs.description;
this.expectationFactory = attrs.expectationFactory; this.expectationFactory = attrs.expectationFactory;
@@ -9443,6 +9458,7 @@ getJasmineRequireObj().Suite = function(j$) {
* The suite's children. * The suite's children.
* @name Suite#children * @name Suite#children
* @type {Array.<(Spec|Suite)>} * @type {Array.<(Spec|Suite)>}
* @since 2.0.0
*/ */
this.children = []; this.children = [];
@@ -9456,6 +9472,7 @@ getJasmineRequireObj().Suite = function(j$) {
* @property {String} status - Once the suite has completed, this string represents the pass/fail status of this suite. * @property {String} status - Once the suite has completed, this string represents the pass/fail status of this suite.
* @property {number} duration - The time in ms for Suite execution, including any before/afterAll, before/afterEach. * @property {number} duration - The time in ms for Suite execution, including any before/afterAll, before/afterEach.
* @property {Object} properties - User-supplied properties, if any, that were set using {@link Env#setSuiteProperty} * @property {Object} properties - User-supplied properties, if any, that were set using {@link Env#setSuiteProperty}
* @since 2.0.0
*/ */
this.result = { this.result = {
id: this.id, id: this.id,
@@ -9486,6 +9503,7 @@ getJasmineRequireObj().Suite = function(j$) {
* @name Suite#getFullName * @name Suite#getFullName
* @function * @function
* @returns {string} * @returns {string}
* @since 2.0.0
*/ */
Suite.prototype.getFullName = function() { Suite.prototype.getFullName = function() {
var fullName = []; var fullName = [];

View File

@@ -52,6 +52,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/** /**
* Get the "this" object that was passed to a specific invocation of this spy. * Get the "this" object that was passed to a specific invocation of this spy.
* @name Spy#calls#thisFor * @name Spy#calls#thisFor
* @since 3.8.0
* @function * @function
* @param {Integer} index The 0-based invocation index. * @param {Integer} index The 0-based invocation index.
* @return {Object?} * @return {Object?}

View File

@@ -7,6 +7,7 @@ getJasmineRequireObj().Clock = function() {
/** /**
* @class Clock * @class Clock
* @since 1.3.0
* @classdesc Jasmine's mock clock is used when testing time dependent code.<br> * @classdesc Jasmine's mock clock is used when testing time dependent code.<br>
* _Note:_ Do not construct this directly. You can get the current clock with * _Note:_ Do not construct this directly. You can get the current clock with
* {@link jasmine.clock}. * {@link jasmine.clock}.

View File

@@ -712,6 +712,7 @@ getJasmineRequireObj().Env = function(j$) {
* @function * @function
* @name Env#topSuite * @name Env#topSuite
* @return {Suite} the root suite * @return {Suite} the root suite
* @since 2.0.0
*/ */
this.topSuite = function() { this.topSuite = function() {
return topSuite; return topSuite;
@@ -903,6 +904,7 @@ getJasmineRequireObj().Env = function(j$) {
* @typedef JasmineStartedInfo * @typedef JasmineStartedInfo
* @property {Int} totalSpecsDefined - The total number of specs defined in this suite. * @property {Int} totalSpecsDefined - The total number of specs defined in this suite.
* @property {Order} order - Information about the ordering (random or not) of this execution of the suite. * @property {Order} order - Information about the ordering (random or not) of this execution of the suite.
* @since 2.0.0
*/ */
reporter.jasmineStarted( reporter.jasmineStarted(
{ {
@@ -941,6 +943,7 @@ getJasmineRequireObj().Env = function(j$) {
* @property {Order} order - Information about the ordering (random or not) of this execution of the suite. * @property {Order} order - Information about the ordering (random or not) of this execution of the suite.
* @property {Expectation[]} failedExpectations - List of expectations that failed in an {@link afterAll} at the global level. * @property {Expectation[]} failedExpectations - List of expectations that failed in an {@link afterAll} at the global level.
* @property {Expectation[]} deprecationWarnings - List of deprecation warnings that occurred at the global level. * @property {Expectation[]} deprecationWarnings - List of deprecation warnings that occurred at the global level.
* @since 2.4.0
*/ */
reporter.jasmineDone( reporter.jasmineDone(
{ {

View File

@@ -126,6 +126,7 @@ getJasmineRequireObj().Expectation = function(j$) {
* Otherwise evaluate the matcher. * Otherwise evaluate the matcher.
* @member * @member
* @name async-matchers#already * @name async-matchers#already
* @since 3.8.0
* @type {async-matchers} * @type {async-matchers}
* @example * @example
* await expectAsync(myPromise).already.toBeResolved(); * await expectAsync(myPromise).already.toBeResolved();

View File

@@ -2,6 +2,7 @@ getJasmineRequireObj().Spec = function(j$) {
/** /**
* @interface Spec * @interface Spec
* @see Configuration#specFilter * @see Configuration#specFilter
* @since 2.0.0
*/ */
function Spec(attrs) { function Spec(attrs) {
this.expectationFactory = attrs.expectationFactory; this.expectationFactory = attrs.expectationFactory;
@@ -12,6 +13,7 @@ getJasmineRequireObj().Spec = function(j$) {
* @name Spec#id * @name Spec#id
* @readonly * @readonly
* @type {string} * @type {string}
* @since 2.0.0
*/ */
this.id = attrs.id; this.id = attrs.id;
/** /**
@@ -19,6 +21,7 @@ getJasmineRequireObj().Spec = function(j$) {
* @name Spec#description * @name Spec#description
* @readonly * @readonly
* @type {string} * @type {string}
* @since 2.0.0
*/ */
this.description = attrs.description || ''; this.description = attrs.description || '';
this.queueableFn = attrs.queueableFn; this.queueableFn = attrs.queueableFn;
@@ -65,7 +68,8 @@ getJasmineRequireObj().Spec = function(j$) {
* @property {String} status - Once the spec has completed, this string represents the pass/fail status of this spec. * @property {String} status - Once the spec has completed, this string represents the pass/fail status of this spec.
* @property {number} duration - The time in ms used by the spec execution, including any before/afterEach. * @property {number} duration - The time in ms used by the spec execution, including any before/afterEach.
* @property {Object} properties - User-supplied properties, if any, that were set using {@link Env#setSpecProperty} * @property {Object} properties - User-supplied properties, if any, that were set using {@link Env#setSpecProperty}
*/ * @since 2.0.0
x */
this.result = { this.result = {
id: this.id, id: this.id,
description: this.description, description: this.description,
@@ -216,6 +220,7 @@ getJasmineRequireObj().Spec = function(j$) {
* @name Spec#getFullName * @name Spec#getFullName
* @function * @function
* @returns {string} * @returns {string}
* @since 2.0.0
*/ */
Spec.prototype.getFullName = function() { Spec.prototype.getFullName = function() {
return this.getSpecName(this); return this.getSpecName(this);

View File

@@ -2,6 +2,7 @@ getJasmineRequireObj().Suite = function(j$) {
/** /**
* @interface Suite * @interface Suite
* @see Env#topSuite * @see Env#topSuite
* @since 2.0.0
*/ */
function Suite(attrs) { function Suite(attrs) {
this.env = attrs.env; this.env = attrs.env;
@@ -10,6 +11,7 @@ getJasmineRequireObj().Suite = function(j$) {
* @name Suite#id * @name Suite#id
* @readonly * @readonly
* @type {string} * @type {string}
* @since 2.0.0
*/ */
this.id = attrs.id; this.id = attrs.id;
/** /**
@@ -24,6 +26,7 @@ getJasmineRequireObj().Suite = function(j$) {
* @name Suite#description * @name Suite#description
* @readonly * @readonly
* @type {string} * @type {string}
* @since 2.0.0
*/ */
this.description = attrs.description; this.description = attrs.description;
this.expectationFactory = attrs.expectationFactory; this.expectationFactory = attrs.expectationFactory;
@@ -42,6 +45,7 @@ getJasmineRequireObj().Suite = function(j$) {
* The suite's children. * The suite's children.
* @name Suite#children * @name Suite#children
* @type {Array.<(Spec|Suite)>} * @type {Array.<(Spec|Suite)>}
* @since 2.0.0
*/ */
this.children = []; this.children = [];
@@ -55,6 +59,7 @@ getJasmineRequireObj().Suite = function(j$) {
* @property {String} status - Once the suite has completed, this string represents the pass/fail status of this suite. * @property {String} status - Once the suite has completed, this string represents the pass/fail status of this suite.
* @property {number} duration - The time in ms for Suite execution, including any before/afterAll, before/afterEach. * @property {number} duration - The time in ms for Suite execution, including any before/afterAll, before/afterEach.
* @property {Object} properties - User-supplied properties, if any, that were set using {@link Env#setSuiteProperty} * @property {Object} properties - User-supplied properties, if any, that were set using {@link Env#setSuiteProperty}
* @since 2.0.0
*/ */
this.result = { this.result = {
id: this.id, id: this.id,
@@ -85,6 +90,7 @@ getJasmineRequireObj().Suite = function(j$) {
* @name Suite#getFullName * @name Suite#getFullName
* @function * @function
* @returns {string} * @returns {string}
* @since 2.0.0
*/ */
Suite.prototype.getFullName = function() { Suite.prototype.getFullName = function() {
var fullName = []; var fullName = [];

View File

@@ -323,6 +323,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get an {@link AsymmetricEqualityTester}, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}), * Get an {@link AsymmetricEqualityTester}, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value is a `String` that contains the specified `String`. * that will succeed if the actual value is a `String` that contains the specified `String`.
* @name jasmine.stringContaining * @name jasmine.stringContaining
* @since 3.10.0
* @function * @function
* @param {String} expected * @param {String} expected
*/ */