Skip to content

Commit eaa610b

Browse files
lint
1 parent d090947 commit eaa610b

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

test/integration/read-write-concern/write_concern.test.ts

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -309,45 +309,46 @@ describe('Write Concern', function () {
309309
let client: MongoClient;
310310
let collection: Collection;
311311
const commands: CommandStartedEvent[] = [];
312+
312313
beforeEach(async function () {
313314
client = this.configuration.newClient({}, { monitorCommands: true });
314315
client.on('commandStarted', filterForCommands('insert', commands));
315316
collection = client.db('foo').collection('bar');
316-
})
317-
317+
});
318318

319319
afterEach(async function () {
320320
await client.close();
321321
commands.length = 0;
322-
})
322+
});
323323

324324
context('when the write concern includes only timeouts', function () {
325325
it('the writeConcern is not added to the command.', async function () {
326-
await collection.insertOne({ name: 'john doe' }, { timeoutMS: 1000, writeConcern: { wtimeout: 1000 } });
326+
await collection.insertOne(
327+
{ name: 'john doe' },
328+
{ timeoutMS: 1000, writeConcern: { wtimeout: 1000 } }
329+
);
327330
const [
328331
{
329-
command: {
330-
writeConcern
331-
}
332+
command: { writeConcern }
332333
}
333334
] = commands;
334335
expect(writeConcern).not.to.exist;
335-
})
336-
})
336+
});
337+
});
337338

338339
context('when the write concern includes only non-timeout values (`w`)', function () {
339340
it('the writeConcern is added to the command.', async function () {
340-
await collection.insertOne({ name: 'john doe' }, { timeoutMS: 1000, writeConcern: { wtimeout: 1000, w: 'majority' } });
341+
await collection.insertOne(
342+
{ name: 'john doe' },
343+
{ timeoutMS: 1000, writeConcern: { wtimeout: 1000, w: 'majority' } }
344+
);
341345
const [
342346
{
343-
command: {
344-
writeConcern
345-
}
347+
command: { writeConcern }
346348
}
347349
] = commands;
348-
expect(writeConcern).to.deep.equal({ w: 'majority' })
349-
})
350-
351-
})
352-
})
350+
expect(writeConcern).to.deep.equal({ w: 'majority' });
351+
});
352+
});
353+
});
353354
});

test/unit/utils.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ describe('driver utils', function () {
403403
it('should be instanceof GeneratorFunction', () => {
404404
const list = new List<number>();
405405
// eslint-disable-next-line @typescript-eslint/no-empty-function
406-
expect(list[Symbol.iterator]).to.be.instanceOf(function* () { }.constructor);
406+
expect(list[Symbol.iterator]).to.be.instanceOf(function* () {}.constructor);
407407
});
408408

409409
it('should only run generator for the number of items in the list', () => {
@@ -857,8 +857,9 @@ describe('driver utils', function () {
857857
continue;
858858
}
859859

860-
const title = `comparing ${oid1} to ${oid2} returns ${result === 0 ? 'equal' : result === -1 ? 'less than' : 'greater than'
861-
}`;
860+
const title = `comparing ${oid1} to ${oid2} returns ${
861+
result === 0 ? 'equal' : result === -1 ? 'less than' : 'greater than'
862+
}`;
862863
// @ts-expect-error: not narrowed based on numeric result, but these values are correct
863864
it(title, () => expect(compareObjectId(oid1, oid2)).to.equal(result));
864865
}

0 commit comments

Comments
 (0)