Skip to content

Commit d06bcc5

Browse files
fix operation constructor test
1 parent 8da7c75 commit d06bcc5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/operations/run_command.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export class RunCommandOperation<T = Document> extends ModernizedOperation<T> {
5454

5555
override buildOptions(timeoutContext: TimeoutContext): ServerCommandOptions {
5656
return {
57+
...this.options,
5758
session: this.session,
5859
timeoutContext,
5960
signal: this.options.signal,

test/integration/crud/abstract_operation.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,11 @@ describe('abstract operation', function () {
188188
},
189189
{
190190
subclassCreator: () =>
191-
new mongodb.RunCommandOperation(db, { dummyCommand: 'dummyCommand' }, {}),
191+
new mongodb.RunCommandOperation(
192+
new mongodb.MongoDBNamespace('foo', 'bar'),
193+
{ dummyCommand: 'dummyCommand' },
194+
{}
195+
),
192196
subclassType: mongodb.RunCommandOperation,
193197
correctCommandName: 'runCommand'
194198
},

0 commit comments

Comments
 (0)