Skip to content

Commit 9dbf31e

Browse files
fix tests
1 parent f2f232e commit 9dbf31e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/unit/api.test.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ const OVERRIDDEN_CLASSES_GETTER = new Map([
3737
['Db', () => new mongodbLegacy.Db(client, 'animals')],
3838
['FindCursor', () => new mongodbLegacy.FindCursor(client, namespace)],
3939
['GridFSBucket', () => new mongodbLegacy.GridFSBucket(db)],
40-
['GridFSBucketWriteStream', () => new mongodbLegacy.GridFSBucket(db).openUploadStream('file')],
40+
['GridFSBucketWriteStream', () => {
41+
const stream = new mongodbLegacy.GridFSBucket(db).openUploadStream('file')
42+
stream.on('error', () => { });
43+
return stream;
44+
}],
4145
['ListCollectionsCursor', () => new mongodbLegacy.ListCollectionsCursor(db, {})],
4246
['ListIndexesCursor', () => new mongodbLegacy.ListIndexesCursor(collection)],
4347
['MongoClient', () => new mongodbLegacy.MongoClient(iLoveJs)],

0 commit comments

Comments
 (0)