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)) {