Skip to content

Commit 8c15366

Browse files
committed
Also mock s3 response for good measure
1 parent 816c780 commit 8c15366

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

spec/test.spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,15 @@ describe('S3Adapter tests', () => {
841841
presignedUrl: true
842842
};
843843
const s3 = new S3Adapter(options);
844+
845+
const mockS3Response = {
846+
ETag: '"mock-etag"',
847+
VersionId: 'mock-version',
848+
Location: 'mock-location'
849+
};
850+
s3ClientMock.send.and.returnValue(Promise.resolve(mockS3Response));
844851
s3._s3Client = s3ClientMock;
852+
845853
// Mock getFileLocation to return a presigned URL
846854
spyOn(s3, 'getFileLocation').and.returnValue(Promise.resolve('https://presigned-url.com/file.txt'));
847855

0 commit comments

Comments
 (0)