Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

test(media-server): cancel on the first video progress update

Aditya Garudd29e5e6b9d06
diff --git a/apps/media-server/src/__tests__/lib/media-video.integration.test.ts b/apps/media-server/src/__tests__/lib/media-video.integration.test.ts
index 91cd8ba13..f7234458a 100644
--- a/apps/media-server/src/__tests__/lib/media-video.integration.test.ts
+++ b/apps/media-server/src/__tests__/lib/media-video.integration.test.ts
@@ -558,7 +558,7 @@ describe("processVideo integration tests", () => {
expect(outcome).toBe(reason);
});
- test("rejects cancellation at final video progress and removes the output", async () => {
+ test("rejects cancellation during video progress and removes the output", async () => {
const metadata = await probeVideo(`file://${TEST_VIDEO_WITH_AUDIO}`);
const controller = new AbortController();
const reason = new Error("Recording worker lease expired");
@@ -568,10 +568,7 @@ describe("processVideo integration tests", () => {
TEST_VIDEO_WITH_AUDIO,
metadata,
{ remuxOnly: true },
- (progress) => {
- if (progress < 100) return;
- controller.abort(reason);
- },
+ () => controller.abort(reason),
controller.signal,
).then(
(output) => {