@@ -49,7 +49,7 @@ import * as util from './utils/index.js';
4949 * @returns {unknown }
5050 * @private
5151 */
52- export function Assertion ( obj , msg , ssfi , lockSsfi ) {
52+ export function Assertion ( obj , msg , ssfi , lockSsfi ) {
5353 util . flag ( this , 'ssfi' , ssfi || Assertion ) ;
5454 util . flag ( this , 'lockSsfi' , lockSsfi ) ;
5555 util . flag ( this , 'object' , obj ) ;
@@ -60,23 +60,31 @@ export function Assertion (obj, msg, ssfi, lockSsfi) {
6060}
6161
6262Object . defineProperty ( Assertion , 'includeStack' , {
63- get : function ( ) {
64- console . warn ( 'Assertion.includeStack is deprecated, use chai.config.includeStack instead.' ) ;
63+ get : function ( ) {
64+ console . warn (
65+ 'Assertion.includeStack is deprecated, use chai.config.includeStack instead.'
66+ ) ;
6567 return config . includeStack ;
6668 } ,
67- set : function ( value ) {
68- console . warn ( 'Assertion.includeStack is deprecated, use chai.config.includeStack instead.' ) ;
69+ set : function ( value ) {
70+ console . warn (
71+ 'Assertion.includeStack is deprecated, use chai.config.includeStack instead.'
72+ ) ;
6973 config . includeStack = value ;
7074 }
7175} ) ;
7276
7377Object . defineProperty ( Assertion , 'showDiff' , {
74- get : function ( ) {
75- console . warn ( 'Assertion.showDiff is deprecated, use chai.config.showDiff instead.' ) ;
78+ get : function ( ) {
79+ console . warn (
80+ 'Assertion.showDiff is deprecated, use chai.config.showDiff instead.'
81+ ) ;
7682 return config . showDiff ;
7783 } ,
78- set : function ( value ) {
79- console . warn ( 'Assertion.showDiff is deprecated, use chai.config.showDiff instead.' ) ;
84+ set : function ( value ) {
85+ console . warn (
86+ 'Assertion.showDiff is deprecated, use chai.config.showDiff instead.'
87+ ) ;
8088 config . showDiff = value ;
8189 }
8290} ) ;
@@ -120,7 +128,14 @@ Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) {
120128 * @private
121129 */
122130
123- Assertion . prototype . assert = function ( expr , msg , negateMsg , expected , _actual , showDiff ) {
131+ Assertion . prototype . assert = function (
132+ expr ,
133+ msg ,
134+ negateMsg ,
135+ expected ,
136+ _actual ,
137+ showDiff
138+ ) {
124139 var ok = util . test ( this , arguments ) ;
125140 if ( false !== showDiff ) showDiff = true ;
126141 if ( undefined === expected && undefined === _actual ) showDiff = false ;
@@ -130,9 +145,9 @@ Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual,
130145 msg = util . getMessage ( this , arguments ) ;
131146 var actual = util . getActual ( this , arguments ) ;
132147 var assertionErrorObjectProperties = {
133- actual : actual
134- , expected : expected
135- , showDiff : showDiff
148+ actual : actual ,
149+ expected : expected ,
150+ showDiff : showDiff
136151 } ;
137152
138153 var operator = util . getOperator ( this , arguments ) ;
@@ -143,7 +158,8 @@ Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual,
143158 throw new AssertionError (
144159 msg ,
145160 assertionErrorObjectProperties ,
146- ( config . includeStack ) ? this . assert : util . flag ( this , 'ssfi' ) ) ;
161+ config . includeStack ? this . assert : util . flag ( this , 'ssfi' )
162+ ) ;
147163 }
148164} ;
149165
@@ -154,11 +170,11 @@ Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual,
154170 *
155171 * @private
156172 */
157- Object . defineProperty ( Assertion . prototype , '_obj' ,
158- { get : function ( ) {
159- return util . flag ( this , 'object' ) ;
160- }
161- , set : function ( val ) {
162- util . flag ( this , 'object' , val ) ;
163- }
173+ Object . defineProperty ( Assertion . prototype , '_obj' , {
174+ get : function ( ) {
175+ return util . flag ( this , 'object' ) ;
176+ } ,
177+ set : function ( val ) {
178+ util . flag ( this , 'object' , val ) ;
179+ }
164180} ) ;
0 commit comments