@@ -179,8 +179,16 @@ assert.AssertionError = AssertionError;
179179function ok ( ...args ) {
180180 innerOk ( ok , args . length , ...args ) ;
181181}
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 ) ;
184192} ;
185193
186194/**
@@ -872,14 +880,13 @@ function strict(...args) {
872880 innerOk ( strict , args . length , ...args ) ;
873881}
874882
875- const assertInstance = new Assert ( { diff : 'simple' , strict : false } ) ;
876883ArrayPrototypeForEach ( [
877884 'ok' , 'fail' , 'equal' , 'notEqual' , 'deepEqual' , 'notDeepEqual' ,
878885 'deepStrictEqual' , 'notDeepStrictEqual' , 'strictEqual' ,
879886 'notStrictEqual' , 'partialDeepStrictEqual' , 'match' , 'doesNotMatch' ,
880887 'throws' , 'rejects' , 'doesNotThrow' , 'doesNotReject' , 'ifError' ,
881888] , ( name ) => {
882- setOwnProperty ( assert , name , Assert . prototype [ name ] . bind ( assertInstance ) ) ;
889+ setOwnProperty ( assert , name , Assert . prototype [ name ] ) ;
883890} ) ;
884891
885892assert . strict = ObjectAssign ( strict , assert , {
0 commit comments