Skip to content

Commit 422fca6

Browse files
fix all tests
1 parent 1fb29f2 commit 422fca6

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

test/integration/collection-management/collection.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ describe('Collection', function () {
547547
const capped = await collection.isCapped();
548548
expect(capped).to.be.false;
549549
} finally {
550-
client.close();
550+
await client.close();
551551
}
552552
}
553553

test/integration/node-specific/bson-options/utf8_validation.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ describe('parsing of utf8-invalid documents with cursors', function () {
9595
if (providedBuffer.includes(targetBytes)) {
9696
if (providedBuffer.split(targetBytes).length !== 2) {
9797
sinon.restore();
98-
const message = `too many target bytes sequences: received ${providedBuffer.split(targetBytes).length
99-
}`;
98+
const message = `too many target bytes sequences: received ${
99+
providedBuffer.split(targetBytes).length
100+
}`;
100101
throw new Error(message);
101102
}
102103
const buffer = Buffer.from(providedBuffer.replace(targetBytes, 'c301'.repeat(8)), 'hex');

test/tools/unified-spec-runner/entities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export class UnifiedMongoClient extends MongoClient {
212212
...getEnvironmentalOptions(),
213213
...(description.serverApi ? { serverApi: description.serverApi } : {}),
214214
// TODO(NODE-5785): We need to increase the truncation length because signature.hash is a Buffer making hellos too long
215-
mongodbLogMaxDocumentLength: 1300
215+
mongodbLogMaxDocumentLength: 1500
216216
};
217217

218218
let logCollector: { buffer: LogMessage[]; write: (log: Log) => void } | undefined;

test/tools/unified-spec-runner/match.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,14 +461,16 @@ function compareCommandStartedEvents(
461461
if (expected!.commandName) {
462462
expect(
463463
expected!.commandName,
464-
`expected ${prefix}.commandName to equal ${expected!.commandName} but received ${actual.commandName
464+
`expected ${prefix}.commandName to equal ${expected!.commandName} but received ${
465+
actual.commandName
465466
}`
466467
).to.equal(actual.commandName);
467468
}
468469
if (expected!.databaseName) {
469470
expect(
470471
expected!.databaseName,
471-
`expected ${prefix}.databaseName to equal ${expected!.databaseName} but received ${actual.databaseName
472+
`expected ${prefix}.databaseName to equal ${expected!.databaseName} but received ${
473+
actual.databaseName
472474
}`
473475
).to.equal(actual.databaseName);
474476
}
@@ -486,7 +488,8 @@ function compareCommandSucceededEvents(
486488
if (expected!.commandName) {
487489
expect(
488490
expected!.commandName,
489-
`expected ${prefix}.commandName to equal ${expected!.commandName} but received ${actual.commandName
491+
`expected ${prefix}.commandName to equal ${expected!.commandName} but received ${
492+
actual.commandName
490493
}`
491494
).to.equal(actual.commandName);
492495
}
@@ -501,7 +504,8 @@ function compareCommandFailedEvents(
501504
if (expected!.commandName) {
502505
expect(
503506
expected!.commandName,
504-
`expected ${prefix}.commandName to equal ${expected!.commandName} but received ${actual.commandName
507+
`expected ${prefix}.commandName to equal ${expected!.commandName} but received ${
508+
actual.commandName
505509
}`
506510
).to.equal(actual.commandName);
507511
}

0 commit comments

Comments
 (0)