File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -1805,12 +1805,7 @@ describe('connections:', function() {
18051805 const m = new mongoose . Mongoose ( ) ;
18061806 m . set ( 'bufferTimeoutMS' , 100 ) ;
18071807
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 / ) ;
18141809 } ) ;
18151810
18161811 it ( 'supports db-level aggregate on connection (gh-15118)' , async function ( ) {
You can’t perform that action at this time.
0 commit comments