File tree 2 files changed +10
-7
lines changed
2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -83,12 +83,15 @@ Object.keys(assert).forEach(function (el) {
83
83
} ) ;
84
84
85
85
Test . prototype . _setAssertError = function ( err ) {
86
- if ( this . assertError === undefined ) {
87
- if ( err === undefined ) {
88
- err = 'undefined' ;
89
- }
90
- this . assertError = err ;
86
+ if ( this . assertError !== undefined ) {
87
+ return ;
91
88
}
89
+
90
+ if ( err === undefined ) {
91
+ err = 'undefined' ;
92
+ }
93
+
94
+ this . assertError = err ;
92
95
} ;
93
96
94
97
// Workaround for power-assert
Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ test('wait for test to end', function (t) {
313
313
} , 1234 ) ;
314
314
} ) ;
315
315
316
- test ( 'promise is rejected with the first assertError' , function ( t ) {
316
+ test ( 'fails with the first assertError' , function ( t ) {
317
317
ava ( function ( a ) {
318
318
a . plan ( 2 ) ;
319
319
a . is ( 1 , 2 ) ;
@@ -325,7 +325,7 @@ test('promise is rejected with the first assertError', function (t) {
325
325
} ) ;
326
326
} ) ;
327
327
328
- test ( 'promise is rejected with thrown falsie value' , function ( t ) {
328
+ test ( 'fails with thrown falsie value' , function ( t ) {
329
329
ava ( function ( ) {
330
330
throw 0 ; // eslint-disable-line no-throw-literal
331
331
} ) . run ( ) . catch ( function ( err ) {
You can’t perform that action at this time.
0 commit comments