File tree 1 file changed +1
-6
lines changed
1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -1805,12 +1805,7 @@ describe('connections:', function() {
1805
1805
const m = new mongoose . Mongoose ( ) ;
1806
1806
m . set ( 'bufferTimeoutMS' , 100 ) ;
1807
1807
1808
- // Delayed `assert.rejects()` pattern, because using the usual `await assert.rejects()` pattern _after_ the `setTimeout()`
1809
- // call below would lead to an unhandled promise rejection.
1810
- const promise = assert . rejects ( m . connection . listCollections ( ) , / C o n n e c t i o n o p e r a t i o n b u f f e r i n g t i m e d o u t a f t e r 1 0 0 m s / ) ;
1811
-
1812
- await new Promise ( resolve => setTimeout ( resolve , 200 ) ) ;
1813
- await promise ;
1808
+ await assert . rejects ( m . connection . listCollections ( ) , / C o n n e c t i o n o p e r a t i o n b u f f e r i n g t i m e d o u t a f t e r 1 0 0 m s / ) ;
1814
1809
} ) ;
1815
1810
1816
1811
it ( 'supports db-level aggregate on connection (gh-15118)' , async function ( ) {
You can’t perform that action at this time.
0 commit comments