@@ -120,7 +120,7 @@ describe('Server Operation Count Tests', function () {
120120 it ( 'is zero after a successful command' , testMetadata , async function ( ) {
121121 const server = Array . from ( client . topology . s . servers . values ( ) ) [ 0 ] ;
122122 expect ( server . s . operationCount ) . to . equal ( 0 ) ;
123- const commandSpy = sinon . spy ( server , 'command ' ) ;
123+ const commandSpy = sinon . spy ( server , 'modernCommand ' ) ;
124124 const incrementSpy = sinon . spy ( server , 'incrementOperationCount' ) ;
125125 const decrementSpy = sinon . spy ( server , 'decrementOperationCount' ) ;
126126
@@ -147,7 +147,7 @@ describe('Server Operation Count Tests', function () {
147147 const server = Array . from ( client . topology . s . servers . values ( ) ) [ 0 ] ;
148148 expect ( server . s . operationCount ) . to . equal ( 0 ) ;
149149
150- const commandSpy = sinon . spy ( server , 'command ' ) ;
150+ const commandSpy = sinon . spy ( server , 'modernCommand ' ) ;
151151
152152 const error = await collection . insertOne ( { count : 1 } ) . catch ( e => e ) ;
153153
@@ -171,7 +171,7 @@ describe('Server Operation Count Tests', function () {
171171 sinon
172172 . stub ( ConnectionPool . prototype , 'checkOut' )
173173 . rejects ( new Error ( 'unable to checkout connection' ) ) ;
174- const commandSpy = sinon . spy ( server , 'command ' ) ;
174+ const commandSpy = sinon . spy ( server , 'modernCommand ' ) ;
175175
176176 const error = await collection . insertOne ( { count : 1 } ) . catch ( e => e ) ;
177177
0 commit comments