I have a piece of code that make use of getSignedUrl
onst [url] = await blob.getSignedUrl({ action: 'read', expires: Date.now() + 60 * 1000, contentType: mimetype })
Unfortunately, firebase emulator cannot sign the URL, my workaround is to mock the return value of blob.getSignedUrl
As following
import { File } from '@google-cloud/storage'
jest.mock('File', () => ({
...jest.requireActual('@google-cloud/storage'),
getSignedUrl: jest.fn().mockReturnValue({ url: 'http://' }),
}))
Although this has no effect. How can I mock getSignedUrl function?