@@ -18,37 +18,37 @@ import * as util from './utils/index.js';
1818 * be assigned during instantiation by passing arguments to this constructor:
1919 *
2020 * - `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.
2424 *
2525 * - `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.
2828 *
2929 * - `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`.
3636 *
3737 * - `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.
4242 *
4343 * - `eql`: This flag contains the deepEqual function to be used by the assertion.
4444 *
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
4747 * @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
5051 */
51-
5252export function Assertion ( obj , msg , ssfi , lockSsfi ) {
5353 util . flag ( this , 'ssfi' , ssfi || Assertion ) ;
5454 util . flag ( this , 'lockSsfi' , lockSsfi ) ;
@@ -111,13 +111,13 @@ Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) {
111111 * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass.
112112 *
113113 * @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
121121 */
122122
123123Assertion . prototype . assert = function ( expr , msg , negateMsg , expected , _actual , showDiff ) {
@@ -152,7 +152,7 @@ Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual,
152152 *
153153 * Quick reference to stored `actual` value for plugin developers.
154154 *
155- * @api private
155+ * @private
156156 */
157157Object . defineProperty ( Assertion . prototype , '_obj' ,
158158 { get : function ( ) {
0 commit comments