Updating mocks.

This commit is contained in:
mike12345567 2024-12-19 15:43:04 +00:00
parent 6e6c3c7bac
commit f9e144f25c
2 changed files with 5 additions and 7 deletions

View File

@ -17,11 +17,6 @@ export class S3 {
listObject() {
return jest.fn().mockReturnThis()
}
getSignedUrl() {
return jest.fn((operation: string, params: any) => {
return `http://s3.example.com/${params.Bucket}/${params.Key}`
})
}
promise() {
return jest.fn().mockReturnThis()
}
@ -30,4 +25,4 @@ export class S3 {
}
}
export const GetObjectCommand = jest.fn()
export const GetObjectCommand = jest.fn(inputs => ({ inputs }))

View File

@ -1 +1,4 @@
export const getSignedUrl = jest.fn(() => "http://localhost:10000")
export const getSignedUrl = jest.fn((_, cmd) => {
const { inputs } = cmd
return `http://s3.example.com/${inputs?.Bucket}/${inputs?.Key}`
})