test(transcode): update statSync mock for streaming proxy upload assertions

This commit is contained in:
yiling
2026-07-29 21:40:25 +08:00
parent 8837b03b3c
commit 69c57b16ab
@@ -82,6 +82,7 @@ vi.mock('fs', async (importOriginal) => {
return {
...actual,
readFileSync: vi.fn().mockReturnValue(Buffer.from('fake data')),
statSync: vi.fn().mockReturnValue({ size: 9 }),
existsSync: vi.fn().mockReturnValue(true),
mkdirSync: vi.fn(),
unlinkSync: vi.fn(),
@@ -609,7 +610,7 @@ describe('Transcode Activities', () => {
expect(s3Service.putObject).toHaveBeenCalledWith(
'shumai',
'files/proj-123/a-audio-proxy.mp4',
expect.any(Buffer),
expect.anything(),
expect.any(Number),
'video/mp4',
)