@@ -105,9 +105,9 @@ describe('CRUD API', function () {
105105 const spy = sinon . spy ( Collection . prototype , 'find' ) ;
106106 const result = await collection . findOne ( { } ) ;
107107 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 ) ;
111111 } ) ;
112112 } ) ;
113113
@@ -149,9 +149,9 @@ describe('CRUD API', function () {
149149 const spy = sinon . spy ( Collection . prototype , 'find' ) ;
150150 const error = await collection . findOne ( { } ) . catch ( error => error ) ;
151151 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 ) ;
155155 } ) ;
156156 } ) ;
157157 } ) ;
0 commit comments