Files
TREK/client
jubnl 5d1cd47b5e fix(tests): bypass MSW FormData hang in uploadPhotos tests 013 and 018
MSW's XHR interceptor calls request.arrayBuffer() on the FormData body
to emit upload progress events; this never resolves in jsdom+Node so the
XHR response is never dispatched and the tests time out. HttpResponse.error()
aborts before that code path runs, which is why test 017 already passed.

Replace the MSW handlers in 013 and 018 with vi.spyOn on journeyApi so
the store's state-management logic is tested without going through FormData
serialisation. Test 018 throws a 4xx-shaped error so isRetryable returns
false immediately, keeping the test instant.
2026-05-22 19:09:25 +02:00
..