Merge pull request #18289 from overleaf/ac-ar-eslint-return-await

Add ESLint rule @typescript-eslint/return-await to backend services

GitOrigin-RevId: 75e3e32597827fcc852e69d479515fc72e8f45e4
This commit is contained in:
Andrew Rumble
2024-05-22 10:37:08 +01:00
committed by Copybot
parent 029cd4abe7
commit 71187a51ba
43 changed files with 1180 additions and 411 deletions

View File

@@ -225,7 +225,7 @@ describe('MigrationPersistorTests', function () {
newPersistor(false),
Settings
)
return expect(
await expect(
migrationPersistor.getObjectStream(bucket, key)
).to.eventually.be.rejected.and.be.an.instanceOf(Errors.NotFoundError)
})
@@ -322,7 +322,7 @@ describe('MigrationPersistorTests', function () {
describe('when the primary persistor throws an error', function () {
it('returns the error', async function () {
primaryPersistor.sendStream.rejects(notFoundError)
return expect(
await expect(
migrationPersistor.sendStream(bucket, key, fileStream)
).to.eventually.be.rejected.and.be.an.instanceOf(Errors.NotFoundError)
})