@@ -179,8 +179,16 @@ assert.AssertionError = AssertionError;
179
179
function ok ( ...args ) {
180
180
innerOk ( ok , args . length , ...args ) ;
181
181
}
182
- Assert . prototype . ok = function ( ...args ) {
183
- innerOk ( this . ok , args . length , ...args ) ;
182
+
183
+ /**
184
+ * Pure assertion tests whether a value is truthy, as determined
185
+ * by !!value.
186
+ * Duplicated as the other `ok` function is supercharged and exposed as default export.
187
+ * @param {...any } args
188
+ * @returns {void }
189
+ */
190
+ Assert . prototype . ok = function ok ( ...args ) {
191
+ innerOk ( ok , args . length , ...args ) ;
184
192
} ;
185
193
186
194
/**
@@ -872,14 +880,13 @@ function strict(...args) {
872
880
innerOk ( strict , args . length , ...args ) ;
873
881
}
874
882
875
- const assertInstance = new Assert ( { diff : 'simple' , strict : false } ) ;
876
883
ArrayPrototypeForEach ( [
877
884
'ok' , 'fail' , 'equal' , 'notEqual' , 'deepEqual' , 'notDeepEqual' ,
878
885
'deepStrictEqual' , 'notDeepStrictEqual' , 'strictEqual' ,
879
886
'notStrictEqual' , 'partialDeepStrictEqual' , 'match' , 'doesNotMatch' ,
880
887
'throws' , 'rejects' , 'doesNotThrow' , 'doesNotReject' , 'ifError' ,
881
888
] , ( name ) => {
882
- setOwnProperty ( assert , name , Assert . prototype [ name ] . bind ( assertInstance ) ) ;
889
+ setOwnProperty ( assert , name , Assert . prototype [ name ] ) ;
883
890
} ) ;
884
891
885
892
assert . strict = ObjectAssign ( strict , assert , {
0 commit comments