From 1f318c3c93558797f3181f390e9081a79995cdb1 Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Thu, 23 Sep 2021 13:38:52 -0700 Subject: [PATCH] Added missing @since annotations --- lib/jasmine-core/jasmine.js | 20 +++++++++++++++++++- src/core/CallTracker.js | 1 + src/core/Clock.js | 1 + src/core/Env.js | 3 +++ src/core/Expectation.js | 1 + src/core/Spec.js | 7 ++++++- src/core/Suite.js | 6 ++++++ src/core/base.js | 1 + 8 files changed, 38 insertions(+), 2 deletions(-) diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 7183fa02..6c05f9c1 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -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}), * that will succeed if the actual value is a `String` that contains the specified `String`. * @name jasmine.stringContaining + * @since 3.10.0 * @function * @param {String} expected */ @@ -719,6 +720,7 @@ getJasmineRequireObj().Spec = function(j$) { /** * @interface Spec * @see Configuration#specFilter + * @since 2.0.0 */ function Spec(attrs) { this.expectationFactory = attrs.expectationFactory; @@ -729,6 +731,7 @@ getJasmineRequireObj().Spec = function(j$) { * @name Spec#id * @readonly * @type {string} + * @since 2.0.0 */ this.id = attrs.id; /** @@ -736,6 +739,7 @@ getJasmineRequireObj().Spec = function(j$) { * @name Spec#description * @readonly * @type {string} + * @since 2.0.0 */ this.description = attrs.description || ''; 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 {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} - */ + * @since 2.0.0 +x */ this.result = { id: this.id, description: this.description, @@ -933,6 +938,7 @@ getJasmineRequireObj().Spec = function(j$) { * @name Spec#getFullName * @function * @returns {string} + * @since 2.0.0 */ Spec.prototype.getFullName = function() { return this.getSpecName(this); @@ -1734,6 +1740,7 @@ getJasmineRequireObj().Env = function(j$) { * @function * @name Env#topSuite * @return {Suite} the root suite + * @since 2.0.0 */ this.topSuite = function() { return topSuite; @@ -1925,6 +1932,7 @@ getJasmineRequireObj().Env = function(j$) { * @typedef JasmineStartedInfo * @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. + * @since 2.0.0 */ 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 {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. + * @since 2.4.0 */ reporter.jasmineDone( { @@ -3159,6 +3168,7 @@ getJasmineRequireObj().CallTracker = function(j$) { /** * Get the "this" object that was passed to a specific invocation of this spy. * @name Spy#calls#thisFor + * @since 3.8.0 * @function * @param {Integer} index The 0-based invocation index. * @return {Object?} @@ -3320,6 +3330,7 @@ getJasmineRequireObj().Clock = function() { /** * @class Clock + * @since 1.3.0 * @classdesc Jasmine's mock clock is used when testing time dependent code.
* _Note:_ Do not construct this directly. You can get the current clock with * {@link jasmine.clock}. @@ -3962,6 +3973,7 @@ getJasmineRequireObj().Expectation = function(j$) { * Otherwise evaluate the matcher. * @member * @name async-matchers#already + * @since 3.8.0 * @type {async-matchers} * @example * await expectAsync(myPromise).already.toBeResolved(); @@ -9403,6 +9415,7 @@ getJasmineRequireObj().Suite = function(j$) { /** * @interface Suite * @see Env#topSuite + * @since 2.0.0 */ function Suite(attrs) { this.env = attrs.env; @@ -9411,6 +9424,7 @@ getJasmineRequireObj().Suite = function(j$) { * @name Suite#id * @readonly * @type {string} + * @since 2.0.0 */ this.id = attrs.id; /** @@ -9425,6 +9439,7 @@ getJasmineRequireObj().Suite = function(j$) { * @name Suite#description * @readonly * @type {string} + * @since 2.0.0 */ this.description = attrs.description; this.expectationFactory = attrs.expectationFactory; @@ -9443,6 +9458,7 @@ getJasmineRequireObj().Suite = function(j$) { * The suite's children. * @name Suite#children * @type {Array.<(Spec|Suite)>} + * @since 2.0.0 */ 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 {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} + * @since 2.0.0 */ this.result = { id: this.id, @@ -9486,6 +9503,7 @@ getJasmineRequireObj().Suite = function(j$) { * @name Suite#getFullName * @function * @returns {string} + * @since 2.0.0 */ Suite.prototype.getFullName = function() { var fullName = []; diff --git a/src/core/CallTracker.js b/src/core/CallTracker.js index 128790fe..fa9ebeaa 100644 --- a/src/core/CallTracker.js +++ b/src/core/CallTracker.js @@ -52,6 +52,7 @@ getJasmineRequireObj().CallTracker = function(j$) { /** * Get the "this" object that was passed to a specific invocation of this spy. * @name Spy#calls#thisFor + * @since 3.8.0 * @function * @param {Integer} index The 0-based invocation index. * @return {Object?} diff --git a/src/core/Clock.js b/src/core/Clock.js index 30c1ca7a..1bb593e1 100644 --- a/src/core/Clock.js +++ b/src/core/Clock.js @@ -7,6 +7,7 @@ getJasmineRequireObj().Clock = function() { /** * @class Clock + * @since 1.3.0 * @classdesc Jasmine's mock clock is used when testing time dependent code.
* _Note:_ Do not construct this directly. You can get the current clock with * {@link jasmine.clock}. diff --git a/src/core/Env.js b/src/core/Env.js index 063c4607..a5d19f3d 100644 --- a/src/core/Env.js +++ b/src/core/Env.js @@ -712,6 +712,7 @@ getJasmineRequireObj().Env = function(j$) { * @function * @name Env#topSuite * @return {Suite} the root suite + * @since 2.0.0 */ this.topSuite = function() { return topSuite; @@ -903,6 +904,7 @@ getJasmineRequireObj().Env = function(j$) { * @typedef JasmineStartedInfo * @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. + * @since 2.0.0 */ 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 {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. + * @since 2.4.0 */ reporter.jasmineDone( { diff --git a/src/core/Expectation.js b/src/core/Expectation.js index 0309ec34..5545e1b0 100644 --- a/src/core/Expectation.js +++ b/src/core/Expectation.js @@ -126,6 +126,7 @@ getJasmineRequireObj().Expectation = function(j$) { * Otherwise evaluate the matcher. * @member * @name async-matchers#already + * @since 3.8.0 * @type {async-matchers} * @example * await expectAsync(myPromise).already.toBeResolved(); diff --git a/src/core/Spec.js b/src/core/Spec.js index 826f7157..2691ce04 100644 --- a/src/core/Spec.js +++ b/src/core/Spec.js @@ -2,6 +2,7 @@ getJasmineRequireObj().Spec = function(j$) { /** * @interface Spec * @see Configuration#specFilter + * @since 2.0.0 */ function Spec(attrs) { this.expectationFactory = attrs.expectationFactory; @@ -12,6 +13,7 @@ getJasmineRequireObj().Spec = function(j$) { * @name Spec#id * @readonly * @type {string} + * @since 2.0.0 */ this.id = attrs.id; /** @@ -19,6 +21,7 @@ getJasmineRequireObj().Spec = function(j$) { * @name Spec#description * @readonly * @type {string} + * @since 2.0.0 */ this.description = attrs.description || ''; 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 {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} - */ + * @since 2.0.0 +x */ this.result = { id: this.id, description: this.description, @@ -216,6 +220,7 @@ getJasmineRequireObj().Spec = function(j$) { * @name Spec#getFullName * @function * @returns {string} + * @since 2.0.0 */ Spec.prototype.getFullName = function() { return this.getSpecName(this); diff --git a/src/core/Suite.js b/src/core/Suite.js index c3e475bd..40f3e6d3 100644 --- a/src/core/Suite.js +++ b/src/core/Suite.js @@ -2,6 +2,7 @@ getJasmineRequireObj().Suite = function(j$) { /** * @interface Suite * @see Env#topSuite + * @since 2.0.0 */ function Suite(attrs) { this.env = attrs.env; @@ -10,6 +11,7 @@ getJasmineRequireObj().Suite = function(j$) { * @name Suite#id * @readonly * @type {string} + * @since 2.0.0 */ this.id = attrs.id; /** @@ -24,6 +26,7 @@ getJasmineRequireObj().Suite = function(j$) { * @name Suite#description * @readonly * @type {string} + * @since 2.0.0 */ this.description = attrs.description; this.expectationFactory = attrs.expectationFactory; @@ -42,6 +45,7 @@ getJasmineRequireObj().Suite = function(j$) { * The suite's children. * @name Suite#children * @type {Array.<(Spec|Suite)>} + * @since 2.0.0 */ 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 {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} + * @since 2.0.0 */ this.result = { id: this.id, @@ -85,6 +90,7 @@ getJasmineRequireObj().Suite = function(j$) { * @name Suite#getFullName * @function * @returns {string} + * @since 2.0.0 */ Suite.prototype.getFullName = function() { var fullName = []; diff --git a/src/core/base.js b/src/core/base.js index ddc3a73c..ec5a6383 100644 --- a/src/core/base.js +++ b/src/core/base.js @@ -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}), * that will succeed if the actual value is a `String` that contains the specified `String`. * @name jasmine.stringContaining + * @since 3.10.0 * @function * @param {String} expected */