Skip to content

Commit 6ce9559

Browse files
fix
1 parent 0ab3e05 commit 6ce9559

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/unit/api.test.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,14 @@ function makeInstance({ client, db, namespace, collection }, className) {
215215
['Db', () => new mongodbLegacy.Db(client, 'animals')],
216216
['FindCursor', () => new mongodbLegacy.FindCursor(client, namespace)],
217217
['GridFSBucket', () => new mongodbLegacy.GridFSBucket(db)],
218-
['GridFSBucketWriteStream', () => new mongodbLegacy.GridFSBucket(db).openUploadStream('file')],
218+
[
219+
'GridFSBucketWriteStream',
220+
() => {
221+
const stream = new mongodbLegacy.GridFSBucket(db).openUploadStream('file');
222+
stream.on('error', () => {});
223+
return stream;
224+
}
225+
],
219226
['ListCollectionsCursor', () => new mongodbLegacy.ListCollectionsCursor(db, {})],
220227
['ListIndexesCursor', () => new mongodbLegacy.ListIndexesCursor(collection)],
221228
['MongoClient', () => new mongodbLegacy.MongoClient('mongodb://iLoveJavascript')],

0 commit comments

Comments
 (0)