From 163f93d6ffe905a7d2f907f83cea934706b69e64 Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Mon, 21 Jun 2021 14:19:31 -0700 Subject: [PATCH] Removed constructors from jsdocs of classes that aren't user-constructable --- lib/jasmine-core/jasmine.js | 29 +++++++++++++++++------------ src/core/Clock.js | 6 ++++-- src/core/Env.js | 9 +++++---- src/core/Spy.js | 8 +++++--- src/core/matchers/matchersUtil.js | 6 +++--- 5 files changed, 34 insertions(+), 24 deletions(-) diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 07a14493..9fd69021 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -979,11 +979,12 @@ getJasmineRequireObj().Order = function() { getJasmineRequireObj().Env = function(j$) { /** - * _Note:_ Do not construct this directly, Jasmine will make one during booting. - * @name Env + * @class Env * @since 2.0.0 - * @classdesc The Jasmine environment - * @constructor + * @classdesc The Jasmine environment.
+ * _Note:_ Do not construct this directly. You can obtain the Env instance by + * calling {@link jasmine.getEnv}. + * @hideconstructor */ function Env(options) { options = options || {}; @@ -3165,9 +3166,11 @@ getJasmineRequireObj().Clock = function() { typeof process.versions.node === 'string'; /** - * _Note:_ Do not construct this directly, Jasmine will make one during booting. You can get the current clock with {@link jasmine.clock}. * @class Clock - * @classdesc Jasmine's mock clock is used when testing time dependent code. + * @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}. + * @hideconstructor */ function Clock(global, delayedFunctionSchedulerFactory, mockDate) { var self = this, @@ -4734,11 +4737,11 @@ getJasmineRequireObj().MatchersUtil = function(j$) { // TODO: convert all uses of j$.pp to use the injected pp /** + * @class MatchersUtil + * @classdesc Utilities for use in implementing matchers.
* _Note:_ Do not construct this directly. Jasmine will construct one and * pass it to matchers and asymmetric equality testers. - * @name MatchersUtil - * @classdesc Utilities for use in implementing matchers - * @constructor + * @hideconstructor */ function MatchersUtil(options) { options = options || {}; @@ -8291,9 +8294,11 @@ getJasmineRequireObj().Spy = function(j$) { }); /** - * _Note:_ Do not construct this directly, use {@link spyOn}, {@link spyOnProperty}, {@link jasmine.createSpy}, or {@link jasmine.createSpyObj} - * @constructor - * @name Spy + * @classdesc _Note:_ Do not construct this directly. Use {@link spyOn}, + * {@link spyOnProperty}, {@link jasmine.createSpy}, or + * {@link jasmine.createSpyObj} instead. + * @class Spy + * @hideconstructor */ function Spy( name, diff --git a/src/core/Clock.js b/src/core/Clock.js index 0ec89e23..30c1ca7a 100644 --- a/src/core/Clock.js +++ b/src/core/Clock.js @@ -6,9 +6,11 @@ getJasmineRequireObj().Clock = function() { typeof process.versions.node === 'string'; /** - * _Note:_ Do not construct this directly, Jasmine will make one during booting. You can get the current clock with {@link jasmine.clock}. * @class Clock - * @classdesc Jasmine's mock clock is used when testing time dependent code. + * @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}. + * @hideconstructor */ function Clock(global, delayedFunctionSchedulerFactory, mockDate) { var self = this, diff --git a/src/core/Env.js b/src/core/Env.js index 741f0e16..4d775d08 100644 --- a/src/core/Env.js +++ b/src/core/Env.js @@ -1,10 +1,11 @@ getJasmineRequireObj().Env = function(j$) { /** - * _Note:_ Do not construct this directly, Jasmine will make one during booting. - * @name Env + * @class Env * @since 2.0.0 - * @classdesc The Jasmine environment - * @constructor + * @classdesc The Jasmine environment.
+ * _Note:_ Do not construct this directly. You can obtain the Env instance by + * calling {@link jasmine.getEnv}. + * @hideconstructor */ function Env(options) { options = options || {}; diff --git a/src/core/Spy.js b/src/core/Spy.js index 03ed46a3..877673d4 100644 --- a/src/core/Spy.js +++ b/src/core/Spy.js @@ -13,9 +13,11 @@ getJasmineRequireObj().Spy = function(j$) { }); /** - * _Note:_ Do not construct this directly, use {@link spyOn}, {@link spyOnProperty}, {@link jasmine.createSpy}, or {@link jasmine.createSpyObj} - * @constructor - * @name Spy + * @classdesc _Note:_ Do not construct this directly. Use {@link spyOn}, + * {@link spyOnProperty}, {@link jasmine.createSpy}, or + * {@link jasmine.createSpyObj} instead. + * @class Spy + * @hideconstructor */ function Spy( name, diff --git a/src/core/matchers/matchersUtil.js b/src/core/matchers/matchersUtil.js index 05fedac8..8d77cb3f 100644 --- a/src/core/matchers/matchersUtil.js +++ b/src/core/matchers/matchersUtil.js @@ -2,11 +2,11 @@ getJasmineRequireObj().MatchersUtil = function(j$) { // TODO: convert all uses of j$.pp to use the injected pp /** + * @class MatchersUtil + * @classdesc Utilities for use in implementing matchers.
* _Note:_ Do not construct this directly. Jasmine will construct one and * pass it to matchers and asymmetric equality testers. - * @name MatchersUtil - * @classdesc Utilities for use in implementing matchers - * @constructor + * @hideconstructor */ function MatchersUtil(options) { options = options || {};