fix: 修改alioss.handler中单测文件的报错 (#105)

This commit is contained in:
luch 2024-05-09 21:27:57 +08:00 committed by GitHub
parent 60fdf14749
commit 412fc75cfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,7 +8,7 @@ describe('AliOssHandler', () => {
buffer: Buffer.from('mockFileContent'), buffer: Buffer.from('mockFileContent'),
} as Express.Multer.File; } as Express.Multer.File;
const mockPutResult = { name: 'mockFileName.txt' }; const mockPutResult = { name: 'mockFileName.txt' };
const mockClient = { const mockClient: any = {
put: jest.fn().mockResolvedValue(mockPutResult), put: jest.fn().mockResolvedValue(mockPutResult),
}; };
const handler = new AliOssHandler({ const handler = new AliOssHandler({