Skip to content

Commit e01ad19

Browse files
committed
update api tests
1 parent ec590cd commit e01ad19

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/tools/api.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const api = [
5252
{ className: 'OrderedBulkOperation', method: 'execute', returnType: 'Promise<BulkWriteResult>' },
5353
{ className: 'UnorderedBulkOperation', method: 'execute', returnType: 'Promise<BulkWriteResult>' },
5454

55-
{ className: 'ChangeStream', method: 'close', returnType: 'Promise<void>' },
55+
{ className: 'ChangeStream', method: 'close', returnType: 'Promise<void>', possibleCallbackPositions: [1, 2]},
5656
{ className: 'ChangeStream', method: 'hasNext', returnType: 'Promise<boolean>' },
5757
{ className: 'ChangeStream', method: 'next', returnType: 'Promise<TChange>' },
5858
{ className: 'ChangeStream', method: 'tryNext', returnType: 'Promise<Document | null>' },
@@ -117,9 +117,9 @@ const api = [
117117
{ className: 'FindCursor', method: 'count', returnType: 'Promise<number>' },
118118
{ className: 'FindCursor', method: 'explain', returnType: 'Promise<Document>' },
119119

120-
{ className: 'GridFSBucket', method: 'delete', returnType: 'Promise<void>', possibleCallbackPositions: [1] },
121-
{ className: 'GridFSBucket', method: 'drop', returnType: 'Promise<void>' },
122-
{ className: 'GridFSBucket', method: 'rename', returnType: 'Promise<void>', possibleCallbackPositions: [1] },
120+
{ className: 'GridFSBucket', method: 'delete', returnType: 'Promise<void>', possibleCallbackPositions: [1, 2] },
121+
{ className: 'GridFSBucket', method: 'drop', returnType: 'Promise<void>', possibleCallbackPositions: [1, 2] },
122+
{ className: 'GridFSBucket', method: 'rename', returnType: 'Promise<void>', possibleCallbackPositions: [1, 2] },
123123
{ className: 'GridFSBucket', method: 'openUploadStream', returnType: 'GridFSBucketWriteStream', notAsync: true },
124124
{ className: 'GridFSBucket', method: 'openUploadStreamWithId', returnType: 'GridFSBucketWriteStream', notAsync: true },
125125
{ className: 'GridFSBucket', method: 'find', returnType: 'FindCursor', notAsync: true },
@@ -141,7 +141,7 @@ const api = [
141141
];
142142

143143
module.exports.api = api;
144-
module.exports.classNames = new Set(api.map(({className}) => className))
144+
module.exports.classNames = new Set(api.map(({ className }) => className))
145145
module.exports.classNameToMethodList = new Map(api.map((api, _, array) =>
146146
[api.className, sorted(Array.from(new Set(Array.from(array.filter(v => v.className === api.className), method => method))), (a, b) => byStrings(a.method, b.method))]
147147
));

0 commit comments

Comments
 (0)