File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2637,15 +2637,16 @@ describe('Find', function () {
2637
2637
expect ( err ) . to . not . exist ;
2638
2638
2639
2639
let selectedServer ;
2640
- const selectServerStub = sinon . stub ( client . topology , 'selectServer' ) . callsFake ( function ( ) {
2640
+ const topology = client . topology ;
2641
+ const selectServerStub = sinon . stub ( topology , 'selectServer' ) . callsFake ( function ( ) {
2641
2642
const args = Array . prototype . slice . call ( arguments ) ;
2642
2643
const originalCallback = args . pop ( ) ;
2643
2644
args . push ( ( err , server ) => {
2644
2645
selectedServer = server ;
2645
2646
originalCallback ( err , server ) ;
2646
2647
} ) ;
2647
2648
2648
- return client . topology . selectServer . wrappedMethod . apply ( this , args ) ;
2649
+ return topology . selectServer . wrappedMethod . apply ( this , args ) ;
2649
2650
} ) ;
2650
2651
2651
2652
const collection = client . db ( ) . collection ( 'test_read_preference' ) ;
You can’t perform that action at this time.
0 commit comments