Skip to content

Commit a58f8ee

Browse files
authored
test(NODE-5733): remove at() usage (#3900)
1 parent 0c16582 commit a58f8ee

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/integration/crud/crud_api.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)