🎥 Make videos programmatically with React
Update rendering.test.ts
Jonny Burger01073bcaea82
diff --git a/packages/it-tests/src/rendering/rendering.test.ts b/packages/it-tests/src/rendering/rendering.test.tsindex 3752a139a6..bfdaede343 100644--- a/packages/it-tests/src/rendering/rendering.test.ts+++ b/packages/it-tests/src/rendering/rendering.test.ts@@ -1,3 +1,4 @@+import { RenderInternals } from "@remotion/renderer";import execa from "execa";import fs from "fs";import path from "path";@@ -261,7 +262,16 @@ test("Should render a video with GIFs", async () => {const info = await execa("ffprobe", [outputPath]);const data = info.stderr;expect(data).toContain("Video: h264");- expect(data).toContain("Duration: 00:00:01.60");+ const ffmpegVersion = await RenderInternals.getFfmpegVersion({+ ffmpegExecutable: null,+ });++ if (ffmpegVersion && ffmpegVersion[1] <= 1) {+ expect(data).toContain("Duration: 00:00:01.62");+ } else {+ expect(data).toContain("Duration: 00:00:01.60");+ }+fs.unlinkSync(outputPath);});@@ -344,7 +354,13 @@ test("Dynamic duration should work", async () => {const data = info.stderr;expect(data).toContain("Video: h264");const expectedDuration = (randomDuration / 30).toFixed(2);- expect(data).toContain(`Duration: 00:00:0${expectedDuration}`);+ const ffmpegVersion = await RenderInternals.getFfmpegVersion({+ ffmpegExecutable: null,+ });+ if (ffmpegVersion && ffmpegVersion[1] > 1) {+ expect(data).toContain(`Duration: 00:00:0${expectedDuration}`);+ }+fs.unlinkSync(outputPath);});