File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -166,9 +166,10 @@ function wrapAssertions(callbacks) {
166166 } ;
167167
168168 if ( promise ) {
169- const result = promise . then ( makeNoop , makeRethrow ) . then ( test ) ;
170- pending ( this , result ) ;
171- return result ;
169+ const intermediate = promise . then ( makeNoop , makeRethrow ) . then ( test ) ;
170+ pending ( this , intermediate ) ;
171+ // Don't reject the returned promise, even if the assertion fails.
172+ return intermediate . catch ( noop ) ;
172173 }
173174
174175 try {
@@ -208,10 +209,10 @@ function wrapAssertions(callbacks) {
208209 } ;
209210
210211 if ( promise ) {
211- const result = promise
212- . then ( noop , reason => test ( makeRethrow ( reason ) ) ) ;
213- pending ( this , result ) ;
214- return result ;
212+ const intermediate = promise . then ( noop , reason => test ( makeRethrow ( reason ) ) ) ;
213+ pending ( this , intermediate ) ;
214+ // Don't reject the returned promise, even if the assertion fails.
215+ return intermediate . catch ( noop ) ;
215216 }
216217
217218 try {
You can’t perform that action at this time.
0 commit comments