Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
test(web): cover media-server convert no-retry behavior
Richie McIlroye7ed49713e52
diff --git a/apps/web/__tests__/unit/media-client.test.ts b/apps/web/__tests__/unit/media-client.test.tsindex 59bbf1db6..1f4663035 100644--- a/apps/web/__tests__/unit/media-client.test.ts+++ b/apps/web/__tests__/unit/media-client.test.ts@@ -268,5 +268,21 @@ describe("media-client", () => {},);});++ it("does not retry conversion failures that would repeat heavyweight work", async () => {+ const mockResponse = {+ ok: false,+ status: 502,+ } as Response;+ mockFetch.mockResolvedValueOnce(mockResponse);++ const result = await fetchConvertedVideoViaMediaServer(+ "https://example.com/video.m3u8",+ ".m3u8",+ );++ expect(result).toBe(mockResponse);+ expect(mockFetch).toHaveBeenCalledTimes(1);+ });});});