@@ -18,37 +18,37 @@ import * as util from './utils/index.js';
18
18
* be assigned during instantiation by passing arguments to this constructor:
19
19
*
20
20
* - `object`: This flag contains the target of the assertion. For example, in
21
- * the assertion `expect(numKittens).to.equal(7);`, the `object` flag will
22
- * contain `numKittens` so that the `equal` assertion can reference it when
23
- * needed.
21
+ * the assertion `expect(numKittens).to.equal(7);`, the `object` flag will
22
+ * contain `numKittens` so that the `equal` assertion can reference it when
23
+ * needed.
24
24
*
25
25
* - `message`: This flag contains an optional custom error message to be
26
- * prepended to the error message that's generated by the assertion when it
27
- * fails.
26
+ * prepended to the error message that's generated by the assertion when it
27
+ * fails.
28
28
*
29
29
* - `ssfi`: This flag stands for "start stack function indicator". It
30
- * contains a function reference that serves as the starting point for
31
- * removing frames from the stack trace of the error that's created by the
32
- * assertion when it fails. The goal is to provide a cleaner stack trace to
33
- * end users by removing Chai's internal functions. Note that it only works
34
- * in environments that support `Error.captureStackTrace`, and only when
35
- * `Chai.config.includeStack` hasn't been set to `false`.
30
+ * contains a function reference that serves as the starting point for
31
+ * removing frames from the stack trace of the error that's created by the
32
+ * assertion when it fails. The goal is to provide a cleaner stack trace to
33
+ * end users by removing Chai's internal functions. Note that it only works
34
+ * in environments that support `Error.captureStackTrace`, and only when
35
+ * `Chai.config.includeStack` hasn't been set to `false`.
36
36
*
37
37
* - `lockSsfi`: This flag controls whether or not the given `ssfi` flag
38
- * should retain its current value, even as assertions are chained off of
39
- * this object. This is usually set to `true` when creating a new assertion
40
- * from within another assertion. It's also temporarily set to `true` before
41
- * an overwritten assertion gets called by the overwriting assertion.
38
+ * should retain its current value, even as assertions are chained off of
39
+ * this object. This is usually set to `true` when creating a new assertion
40
+ * from within another assertion. It's also temporarily set to `true` before
41
+ * an overwritten assertion gets called by the overwriting assertion.
42
42
*
43
43
* - `eql`: This flag contains the deepEqual function to be used by the assertion.
44
44
*
45
- * @param {Mixed } obj target of the assertion
46
- * @param {String } msg (optional) custom error message
45
+ * @param {unknown } obj target of the assertion
46
+ * @param {string } msg (optional) custom error message
47
47
* @param {Function } ssfi (optional) starting point for removing stack frames
48
- * @param {Boolean } lockSsfi (optional) whether or not the ssfi flag is locked
49
- * @api private
48
+ * @param {boolean } lockSsfi (optional) whether or not the ssfi flag is locked
49
+ * @returns {unknown }
50
+ * @private
50
51
*/
51
-
52
52
export function Assertion ( obj , msg , ssfi , lockSsfi ) {
53
53
util . flag ( this , 'ssfi' , ssfi || Assertion ) ;
54
54
util . flag ( this , 'lockSsfi' , lockSsfi ) ;
@@ -111,13 +111,13 @@ Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) {
111
111
* Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass.
112
112
*
113
113
* @name assert
114
- * @param {Philosophical } expression to be tested
115
- * @param {String| Function } message or function that returns message to display if expression fails
116
- * @param {String| Function } negatedMessage or function that returns negatedMessage to display if negated expression fails
117
- * @param {Mixed } expected value (remember to check for negation)
118
- * @param {Mixed } actual (optional) will default to `this.obj`
119
- * @param {Boolean } showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails
120
- * @api private
114
+ * @param {unknown } expression to be tested
115
+ * @param {string | Function } message or function that returns message to display if expression fails
116
+ * @param {string | Function } negatedMessage or function that returns negatedMessage to display if negated expression fails
117
+ * @param {unknown } expected value (remember to check for negation)
118
+ * @param {unknown } actual (optional) will default to `this.obj`
119
+ * @param {boolean } showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails
120
+ * @private
121
121
*/
122
122
123
123
Assertion . prototype . assert = function ( expr , msg , negateMsg , expected , _actual , showDiff ) {
@@ -152,7 +152,7 @@ Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual,
152
152
*
153
153
* Quick reference to stored `actual` value for plugin developers.
154
154
*
155
- * @api private
155
+ * @private
156
156
*/
157
157
Object . defineProperty ( Assertion . prototype , '_obj' ,
158
158
{ get : function ( ) {
0 commit comments