Updating mocks.
This commit is contained in:
parent
6e6c3c7bac
commit
f9e144f25c
|
@ -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 }))
|
||||
|
|
|
@ -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}`
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue