Skip to content

Commit

Permalink
Tweak JSDoc for specification classes
Browse files Browse the repository at this point in the history
  • Loading branch information
bryaningl3 committed Jan 27, 2022
1 parent fca020d commit 367f671
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 24 deletions.
4 changes: 2 additions & 2 deletions specifications/Between.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ module.exports = (() => {

/**
* A {@link Specification} that passes when the value of the data item
* is between the values passed to the constructor
* is between the values passed to the constructor.
*
* @public
* @extends {Specification}
* @param {Number} value
* @param {Number[]} values
*/
class Between extends Specification {
constructor(values) {
Expand Down
7 changes: 4 additions & 3 deletions specifications/Changes.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ module.exports = (() => {

/**
* A stateful {@link Specification} that passes when the value of the data item
* is a changes. This specification will never pass on the first data
* item tested. Instead, the first data item sets the "previous" value
* used to compare the next data item to.
* a changes. This specification will never pass on the first data item tested.
* Each invocation compares the previous data item to the current data item,
* which means the specification can only pass on the second (or subsequent)
* invocation.
*
* @public
* @extends {Specification}
Expand Down
2 changes: 1 addition & 1 deletion specifications/Contains.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = (() => {

/**
* A {@link Specification} that passes when an item (passed to the
* constructor) is contained within an array.
* constructor) is contained within an array passed as the data item.
*
* @public
* @extends {Specification}
Expand Down
4 changes: 1 addition & 3 deletions specifications/Nan.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ module.exports = (() => {
'use strict';

/**
* A {@link Specification} that passes when the value of the data item
* is NaN.
* A {@link Specification} that passes when a data item evaluates to NaN.
*
* @public
* @extends {Specification}
* @param {*} value
*/
class Nan extends Specification {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion specifications/Numeric.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = (() => {
'use strict';

/**
* A {@link Specification} that passes when the value of the data item
* A {@link Specification} that passes when the type of the data item
* is a number.
*
* @public
Expand Down
26 changes: 12 additions & 14 deletions test/SpecRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -16224,11 +16224,11 @@ module.exports = (() => {
'use strict';
/**
* A {@link Specification} that passes when the value of the data item
* is between the values passed to the constructor
* is between the values passed to the constructor.
*
* @public
* @extends {Specification}
* @param {Number} value
* @param {Number[]} values
*/

class Between extends Specification {
Expand Down Expand Up @@ -16261,16 +16261,16 @@ module.exports = (() => {
'use strict';
/**
* A stateful {@link Specification} that passes when the value of the data item
* is a changes. This specification will never pass on the first data
* item tested. Instead, the first data item sets the "previous" value
* used to compare the next data item to.
* a changes. This specification will never pass on the first data item tested.
* Each invocation compares the previous data item to the current data item,
* which means the specification can only pass on the second (or subsequent)
* invocation.
*
* @public
* @extends {Specification}
* @param {*} value
*/

class ChangesSpecification extends Specification {
class Changes extends Specification {
constructor() {
super();
this._previous = null;
Expand All @@ -16289,12 +16289,12 @@ module.exports = (() => {
}

toString() {
return '[ChangesSpecification]';
return '[Changes]';
}

}

return ChangesSpecification;
return Changes;
})();

},{"./../lang/is":36,"./Specification":74}],65:[function(require,module,exports){
Expand Down Expand Up @@ -16340,7 +16340,7 @@ module.exports = (() => {
'use strict';
/**
* A {@link Specification} that passes when an item (passed to the
* constructor) is contained within an array.
* constructor) is contained within an array passed as the data item.
*
* @public
* @extends {Specification}
Expand Down Expand Up @@ -16437,12 +16437,10 @@ const Specification = require('./Specification');
module.exports = (() => {
'use strict';
/**
* A {@link Specification} that passes when the value of the data item
* is NaN.
* A {@link Specification} that passes when a data item evaluates to NaN.
*
* @public
* @extends {Specification}
* @param {*} value
*/

class Nan extends Specification {
Expand Down Expand Up @@ -16480,7 +16478,7 @@ const Specification = require('./Specification');
module.exports = (() => {
'use strict';
/**
* A {@link Specification} that passes when the value of the data item
* A {@link Specification} that passes when the type of the data item
* is a number.
*
* @public
Expand Down

0 comments on commit 367f671

Please sign in to comment.