@@ -63,7 +63,7 @@ describe('GetMoreOperation', function () {
63
63
maxTimeMS : 500
64
64
} ;
65
65
66
- await operation . execute . bind ( operation ) ( server , undefined ) ;
66
+ await operation . execute ( server , undefined ) ;
67
67
expect ( stub . calledOnce ) . to . be . true ;
68
68
const call = stub . getCall ( 0 ) ;
69
69
expect ( call . args [ 0 ] ) . to . equal ( namespace ) ;
@@ -108,7 +108,7 @@ describe('GetMoreOperation', function () {
108
108
it ( 'should build basic getMore command with cursorId and collection' , async ( ) => {
109
109
const getMoreOperation = new GetMoreOperation ( namespace , cursorId , server , { } ) ;
110
110
const stub = sinon . stub ( server , 'command' ) . yieldsRight ( ) ;
111
- await getMoreOperation . execute . bind ( getMoreOperation ) ( server , undefined ) ;
111
+ await getMoreOperation . execute ( server , undefined ) ;
112
112
expect ( stub ) . to . have . been . calledOnceWith ( namespace , {
113
113
getMore : cursorId ,
114
114
collection : namespace . collection
@@ -121,7 +121,7 @@ describe('GetMoreOperation', function () {
121
121
} ;
122
122
const getMoreOperation = new GetMoreOperation ( namespace , cursorId , server , options ) ;
123
123
const stub = sinon . stub ( server , 'command' ) . yieldsRight ( ) ;
124
- await getMoreOperation . execute . bind ( getMoreOperation ) ( server , undefined ) ;
124
+ await getMoreOperation . execute ( server , undefined ) ;
125
125
expect ( stub ) . to . have . been . calledOnceWith (
126
126
namespace ,
127
127
sinon . match . has ( 'batchSize' , options . batchSize )
@@ -134,7 +134,7 @@ describe('GetMoreOperation', function () {
134
134
} ;
135
135
const getMoreOperation = new GetMoreOperation ( namespace , cursorId , server , options ) ;
136
136
const stub = sinon . stub ( server , 'command' ) . yieldsRight ( ) ;
137
- await getMoreOperation . execute . bind ( getMoreOperation ) ( server , undefined ) ;
137
+ await getMoreOperation . execute ( server , undefined ) ;
138
138
expect ( stub ) . to . have . been . calledOnceWith (
139
139
namespace ,
140
140
sinon . match . has ( 'maxTimeMS' , options . maxAwaitTimeMS )
@@ -192,7 +192,7 @@ describe('GetMoreOperation', function () {
192
192
} ;
193
193
const operation = new GetMoreOperation ( namespace , cursorId , server , optionsWithComment ) ;
194
194
const stub = sinon . stub ( server , 'command' ) . yieldsRight ( ) ;
195
- await operation . execute . bind ( operation ) ( server , undefined ) ;
195
+ await operation . execute ( server , undefined ) ;
196
196
expect ( stub ) . to . have . been . calledOnceWith ( namespace , getMore ) ;
197
197
} ) ;
198
198
}
@@ -215,9 +215,7 @@ describe('GetMoreOperation', function () {
215
215
server ,
216
216
options
217
217
) ;
218
- const error = await getMoreOperation . execute
219
- . bind ( getMoreOperation ) ( server , undefined )
220
- . catch ( error => error ) ;
218
+ const error = await getMoreOperation . execute ( server , undefined ) . catch ( error => error ) ;
221
219
expect ( error ) . to . be . instanceOf ( MongoRuntimeError ) ;
222
220
} ) ;
223
221
@@ -228,9 +226,7 @@ describe('GetMoreOperation', function () {
228
226
server ,
229
227
options
230
228
) ;
231
- const error = await getMoreOperation . execute
232
- . bind ( getMoreOperation ) ( server , undefined )
233
- . catch ( error => error ) ;
229
+ const error = await getMoreOperation . execute ( server , undefined ) . catch ( error => error ) ;
234
230
expect ( error ) . to . be . instanceOf ( MongoRuntimeError ) ;
235
231
} ) ;
236
232
@@ -241,9 +237,7 @@ describe('GetMoreOperation', function () {
241
237
server ,
242
238
options
243
239
) ;
244
- const error = await getMoreOperation . execute
245
- . bind ( getMoreOperation ) ( server , undefined )
246
- . catch ( error => error ) ;
240
+ const error = await getMoreOperation . execute ( server , undefined ) . catch ( error => error ) ;
247
241
expect ( error ) . to . be . instanceOf ( MongoRuntimeError ) ;
248
242
} ) ;
249
243
} ) ;
0 commit comments