Skip to content

Commit 6546d9a

Browse files
committed
wip
1 parent d5b4d55 commit 6546d9a

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/mongo_client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,9 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> implements
636636
}
637637

638638
/**
639-
* Cleans up client-side resources used by the MongoCLient and . This includes:
639+
* Cleans up client-side resources used by the MongoClient.
640+
*
641+
* This includes:
640642
*
641643
* - Closes all open, unused connections (see note).
642644
* - Ends all in-use sessions with {@link ClientSession#endSession|ClientSession.endSession()}.

test/integration/change-streams/change_stream.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const pipeline = [
4444
{ $addFields: { comment: 'The documentKey field has been projected out of this document.' } }
4545
];
4646

47-
describe('Change Streams', function () {
47+
describe.only('Change Streams', function () {
4848
let client: MongoClient;
4949
let collection: Collection;
5050
let changeStream: ChangeStream;
@@ -63,6 +63,7 @@ describe('Change Streams', function () {
6363
await csDb.createCollection('test').catch(() => null);
6464
collection = csDb.collection('test');
6565
changeStream = collection.watch();
66+
changeStream.on('error', () => null);
6667
});
6768

6869
afterEach(async () => {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// eslint-disable-next-line @typescript-eslint/no-require-imports
22
const process = require('process');
33

4-
process.on('unhandledRejection', error => {
4+
process.on('unhandledRejection', (error, promise) => {
55
throw error;
66
});

0 commit comments

Comments
 (0)