|
1 | 1 | /* eslint-disable @typescript-eslint/no-empty-function */ |
| 2 | +import { MongoClient } from 'mongodb-legacy'; |
2 | 3 | import { type TestConfiguration } from '../../tools/runner/config'; |
3 | 4 | import { runScriptAndGetProcessInfo } from './resource_tracking_script_builder'; |
| 5 | +import { expect } from 'chai'; |
4 | 6 |
|
5 | 7 | describe.only('MongoClient.close() Integration', () => { |
6 | 8 | // note: these tests are set-up in accordance of the resource ownership tree |
@@ -428,13 +430,13 @@ describe.only('MongoClient.close() Integration', () => { |
428 | 430 |
|
429 | 431 | describe('after SRVPoller is created', () => { |
430 | 432 | it.only('timers are cleaned up by client.close()', metadata, async () => { |
431 | | - const run = async function ({ MongoClient, uri, expect, sinon, getTimerCount }) { |
| 433 | + const run = async function ({ MongoClient, uri, expect, getTimerCount }) { |
432 | 434 | const client = new MongoClient(uri); |
433 | 435 | await client.connect(); |
434 | 436 | const description = client.topology.s.description; |
435 | 437 | // simulate transition to sharded |
436 | | - client.topology.emit('topologyDescriptionChanged', description, { ... description, type: 'Sharded'}); |
437 | | - expect(client.topology.s.srvPoller?._timeout).to.exist; |
| 438 | + client.topology.emit('topologyDescriptionChanged', description, { ... description, type: 'Sharded'}); |
| 439 | + expect(client.topology.s.srvPoller._timeout).to.exist; |
438 | 440 | await client.close(); |
439 | 441 | expect(getTimerCount()).to.equal(0); |
440 | 442 | }; |
|
0 commit comments