Skip to content

Commit

Permalink
test(NODE-5733): remove at() usage (#3900)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken authored Nov 9, 2023
1 parent 0c16582 commit a58f8ee
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/integration/crud/crud_api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ describe('CRUD API', function () {
const spy = sinon.spy(Collection.prototype, 'find');
const result = await collection.findOne({});
expect(result).to.deep.equal({ _id: 1 });
expect(events.at(0)).to.be.instanceOf(CommandSucceededEvent);
expect(spy.returnValues.at(0)).to.have.property('closed', true);
expect(spy.returnValues.at(0)).to.have.nested.property('session.hasEnded', true);
expect(events[0]).to.be.instanceOf(CommandSucceededEvent);
expect(spy.returnValues[0]).to.have.property('closed', true);
expect(spy.returnValues[0]).to.have.nested.property('session.hasEnded', true);
});
});

Expand Down Expand Up @@ -149,9 +149,9 @@ describe('CRUD API', function () {
const spy = sinon.spy(Collection.prototype, 'find');
const error = await collection.findOne({}).catch(error => error);
expect(error).to.be.instanceOf(MongoServerError);
expect(events.at(0)).to.be.instanceOf(CommandFailedEvent);
expect(spy.returnValues.at(0)).to.have.property('closed', true);
expect(spy.returnValues.at(0)).to.have.nested.property('session.hasEnded', true);
expect(events[0]).to.be.instanceOf(CommandFailedEvent);
expect(spy.returnValues[0]).to.have.property('closed', true);
expect(spy.returnValues[0]).to.have.nested.property('session.hasEnded', true);
});
});
});
Expand Down

0 comments on commit a58f8ee

Please sign in to comment.