Skip to content

Commit f5616d9

Browse files
committed
Also mock s3 response for good measure
1 parent 7afb0a2 commit f5616d9

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
@@ -874,7 +874,15 @@ describe('S3Adapter tests', () => {
874874
presignedUrl: true
875875
};
876876
const s3 = new S3Adapter(options);
877+
878+
const mockS3Response = {
879+
ETag: '"mock-etag"',
880+
VersionId: 'mock-version',
881+
Location: 'mock-location'
882+
};
883+
s3ClientMock.send.and.returnValue(Promise.resolve(mockS3Response));
877884
s3._s3Client = s3ClientMock;
885+
878886
// Mock getFileLocation to return a presigned URL
879887
spyOn(s3, 'getFileLocation').and.returnValue(Promise.resolve('https://presigned-url.com/file.txt'));
880888

0 commit comments

Comments
 (0)