From 0661c4f72595a397f7b07b894ad7d2a52880bfd7 Mon Sep 17 00:00:00 2001 From: Remi Date: Mon, 21 Dec 2020 01:04:00 +0100 Subject: [PATCH] fix(techdocs-common): format --- packages/techdocs-common/__mocks__/aws-sdk.ts | 12 ++++++------ .../techdocs-common/src/stages/publish/awsS3.test.ts | 12 ++++++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/packages/techdocs-common/__mocks__/aws-sdk.ts b/packages/techdocs-common/__mocks__/aws-sdk.ts index 966021fea7..ea62a5b541 100644 --- a/packages/techdocs-common/__mocks__/aws-sdk.ts +++ b/packages/techdocs-common/__mocks__/aws-sdk.ts @@ -47,7 +47,7 @@ export class S3 { getObject({ Key }: { Key: string }) { return { - promise: () => this.checkFileExists(Key) + promise: () => this.checkFileExists(Key), }; } @@ -56,15 +56,15 @@ export class S3 { if (fs.existsSync(Key)) { resolve(''); } else { - reject({ message: 'The object doest not exist !'}); + reject({ message: 'The object doest not exist !' }); } - }) + }); } headBucket() { - return new Promise((resolve) => { - resolve('') - }) + return new Promise(resolve => { + resolve(''); + }); } upload({ Key }: { Key: string }) { diff --git a/packages/techdocs-common/src/stages/publish/awsS3.test.ts b/packages/techdocs-common/src/stages/publish/awsS3.test.ts index 1e7ed024b2..883674b332 100644 --- a/packages/techdocs-common/src/stages/publish/awsS3.test.ts +++ b/packages/techdocs-common/src/stages/publish/awsS3.test.ts @@ -90,10 +90,14 @@ describe('AwsS3Publish', () => { }); const entity = createMockEntity(); - await publisher.publish({ - entity, - directory: '/path/to/generatedDirectory', - }).catch(error => expect(error).toBe(`Unable to upload file(s) to AWS S3. Error`)) + await publisher + .publish({ + entity, + directory: '/path/to/generatedDirectory', + }) + .catch(error => + expect(error).toBe(`Unable to upload file(s) to AWS S3. Error`), + ); mockFs.restore(); }); });