From 2f075ac79fc2d8b50b85e72805a6eaf316c6e9ee Mon Sep 17 00:00:00 2001 From: Bailey Pearson Date: Tue, 30 Jul 2024 11:50:03 -0600 Subject: [PATCH] tabs to spaces --- .../explicit-resource-management/main.test.ts | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/test/explicit-resource-management/main.test.ts b/test/explicit-resource-management/main.test.ts index 0722e9ad8e..c29719eb69 100644 --- a/test/explicit-resource-management/main.test.ts +++ b/test/explicit-resource-management/main.test.ts @@ -17,68 +17,68 @@ async function setUpCollection(client: MongoClient) { describe('explicit resource management smoke tests', function () { describe('MongoClient', function () { it('does not crash or error when used with await-using syntax', async function () { - await using client = new MongoClient(process.env.MONGODB_URI!); - await client.connect(); + await using client = new MongoClient(process.env.MONGODB_URI!); + await client.connect(); }) }) describe('Cursors', function () { it('does not crash or error when used with await-using syntax', async function () { await using client = new MongoClient(process.env.MONGODB_URI!); - await client.connect(); + await client.connect(); - const collection = await setUpCollection(client); + const collection = await setUpCollection(client); - await using cursor = collection.find(); - await cursor.next(); - await cursor.next(); - await cursor.next(); + await using cursor = collection.find(); + await cursor.next(); + await cursor.next(); + await cursor.next(); }) describe('cursor streams', function() { it('does not crash or error when used with await-using syntax', async function() { - await using client = new MongoClient(process.env.MONGODB_URI!); - await client.connect(); + await using client = new MongoClient(process.env.MONGODB_URI!); + await client.connect(); - const collection = await setUpCollection(client); + const collection = await setUpCollection(client); - await using readable = collection.find().stream(); + await using readable = collection.find().stream(); }) }) }) describe('Sessions', function () { it('does not crash or error when used with await-using syntax', async function () { - await using client = new MongoClient(process.env.MONGODB_URI!); - await client.connect(); + await using client = new MongoClient(process.env.MONGODB_URI!); + await client.connect(); - await using session = client.startSession(); + await using session = client.startSession(); }) }) describe('ChangeStreams', function () { it('does not crash or error when used with await-using syntax', async function () { await using client = new MongoClient(process.env.MONGODB_URI!); - await client.connect(); + await client.connect(); - const collection = await setUpCollection(client); - await using cs = collection.watch(); + const collection = await setUpCollection(client); + await using cs = collection.watch(); - setTimeout(1000).then(() => collection.insertOne({ name: 'bailey' })); - await cs.next(); + setTimeout(1000).then(() => collection.insertOne({ name: 'bailey' })); + await cs.next(); }) }); describe('GridFSDownloadStream', function () { it('does not crash or error when used with await-using syntax', async function () { - await using client = new MongoClient(process.env.MONGODB_URI!); - await client.connect(); + await using client = new MongoClient(process.env.MONGODB_URI!); + await client.connect(); - const bucket = new GridFSBucket(client.db('foo')); - const uploadStream = bucket.openUploadStream('foo.txt') - await pipeline(Readable.from("AAAAAAA".split('')), uploadStream); + const bucket = new GridFSBucket(client.db('foo')); + const uploadStream = bucket.openUploadStream('foo.txt') + await pipeline(Readable.from("AAAAAAA".split('')), uploadStream); - await using downloadStream = bucket.openDownloadStreamByName('foo.txt'); + await using downloadStream = bucket.openDownloadStreamByName('foo.txt'); }) }); })