From 1582b03b218cec96e7503fff04a9b38db3260007 Mon Sep 17 00:00:00 2001 From: Remi Date: Mon, 21 Dec 2020 16:28:27 +0100 Subject: [PATCH] fix(techdocs): fix JSON schema to match AWS S3 region + fix tests --- packages/techdocs-common/__mocks__/aws-sdk.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/techdocs-common/__mocks__/aws-sdk.ts b/packages/techdocs-common/__mocks__/aws-sdk.ts index ea62a5b541..e3697a5cf3 100644 --- a/packages/techdocs-common/__mocks__/aws-sdk.ts +++ b/packages/techdocs-common/__mocks__/aws-sdk.ts @@ -25,6 +25,12 @@ export class S3 { } headObject({ Key }: { Key: string }) { + return { + promise: () => this.checkFileExists(Key), + }; + } + + getObject({ Key }: { Key: string }) { return { promise: () => this.checkFileExists(Key), createReadStream: () => { @@ -45,12 +51,6 @@ export class S3 { }; } - getObject({ Key }: { Key: string }) { - return { - promise: () => this.checkFileExists(Key), - }; - } - checkFileExists(Key: string) { return new Promise((resolve, reject) => { if (fs.existsSync(Key)) {