@@ -105,9 +105,9 @@ describe('CRUD API', function () {
105
105
const spy = sinon . spy ( Collection . prototype , 'find' ) ;
106
106
const result = await collection . findOne ( { } ) ;
107
107
expect ( result ) . to . deep . equal ( { _id : 1 } ) ;
108
- expect ( events . at ( 0 ) ) . to . be . instanceOf ( CommandSucceededEvent ) ;
109
- expect ( spy . returnValues . at ( 0 ) ) . to . have . property ( 'closed' , true ) ;
110
- expect ( spy . returnValues . at ( 0 ) ) . to . have . nested . property ( 'session.hasEnded' , true ) ;
108
+ expect ( events [ 0 ] ) . to . be . instanceOf ( CommandSucceededEvent ) ;
109
+ expect ( spy . returnValues [ 0 ] ) . to . have . property ( 'closed' , true ) ;
110
+ expect ( spy . returnValues [ 0 ] ) . to . have . nested . property ( 'session.hasEnded' , true ) ;
111
111
} ) ;
112
112
} ) ;
113
113
@@ -149,9 +149,9 @@ describe('CRUD API', function () {
149
149
const spy = sinon . spy ( Collection . prototype , 'find' ) ;
150
150
const error = await collection . findOne ( { } ) . catch ( error => error ) ;
151
151
expect ( error ) . to . be . instanceOf ( MongoServerError ) ;
152
- expect ( events . at ( 0 ) ) . to . be . instanceOf ( CommandFailedEvent ) ;
153
- expect ( spy . returnValues . at ( 0 ) ) . to . have . property ( 'closed' , true ) ;
154
- expect ( spy . returnValues . at ( 0 ) ) . to . have . nested . property ( 'session.hasEnded' , true ) ;
152
+ expect ( events [ 0 ] ) . to . be . instanceOf ( CommandFailedEvent ) ;
153
+ expect ( spy . returnValues [ 0 ] ) . to . have . property ( 'closed' , true ) ;
154
+ expect ( spy . returnValues [ 0 ] ) . to . have . nested . property ( 'session.hasEnded' , true ) ;
155
155
} ) ;
156
156
} ) ;
157
157
} ) ;
0 commit comments