some pm2 fiex + unit test work for new flyeruploader

This commit is contained in:
2025-12-26 19:35:44 -08:00
parent 1b52478f97
commit 27810bbb36
7 changed files with 60 additions and 12 deletions

View File

@@ -36,7 +36,7 @@ const createWrapper = () => {
describe('useFlyerUploader Hook with React Query', () => {
beforeEach(() => {
vi.clearAllMocks();
vi.resetAllMocks();
mockedChecksumUtil.generateFileChecksum.mockResolvedValue('mock-checksum');
});
@@ -78,7 +78,7 @@ describe('useFlyerUploader Hook with React Query', () => {
await waitFor(() => expect(result.current.statusMessage).toBe('Processing...'));
// Assert completed state
await waitFor(() => expect(result.current.processingState).toBe('completed'));
await waitFor(() => expect(result.current.processingState).toBe('completed'), { timeout: 5000 });
expect(result.current.flyerId).toBe(777);
});