Skip to content

Commit 4c13652

Browse files
committed
test: fix assertion
1 parent 3a5832b commit 4c13652

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/integration/node-specific/mongo_client.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,16 +188,17 @@ describe('class MongoClient', function () {
188188
beforeEach(async function () {
189189
spy = sinon.spy(Socket.prototype, 'setKeepAlive');
190190
client = this.configuration.newClient(options);
191-
await client.connect();
192191
});
193192

194193
afterEach(async function () {
195194
await client?.close();
196195
spy.restore();
197196
});
198197

199-
it('passes through the option', function () {
200-
expect(spy).to.have.been.calledWith(true, -100);
198+
it('raises an error', function () {
199+
expect(async () => {
200+
await client.connect();
201+
}).to.throw(/keepAliveInitialDelay can only be a positive int value/);
201202
});
202203
});
203204
});

0 commit comments

Comments
 (0)