Skip to content

🎥 Make videos programmatically with React

Discard changes to packages/it-tests/src/rendering/frame-accuracy.test.ts

Jonny Burgera5682d90bf15
diff --git a/packages/it-tests/src/rendering/frame-accuracy.test.ts b/packages/it-tests/src/rendering/frame-accuracy.test.ts
index ac7f73068e..0cebb2eb89 100644
--- a/packages/it-tests/src/rendering/frame-accuracy.test.ts
+++ b/packages/it-tests/src/rendering/frame-accuracy.test.ts
@@ -75,7 +75,7 @@ const getMissedFramesforCodec = async (
colorDistance.blue,
colorDistance.green
);
- const threshold = 30;
+ const threshold = 40;
if (highestDistance > threshold) {
console.log(colorDistance, { threshold, frame, filename });
missedFrames++;
@@ -86,22 +86,46 @@ const getMissedFramesforCodec = async (
return missedFrames;
};
-test("should render correct frames from embedded videos - WebM onthread", async () => {
- const missedFrames = await getMissedFramesforCodec("webm", false);
- expect(missedFrames).toBeLessThanOrEqual(0);
-});
+test(
+ "should render correct frames from embedded videos - WebM onthread",
+ async () => {
+ const missedFrames = await getMissedFramesforCodec("webm", false);
+ expect(missedFrames).toBeLessThanOrEqual(1);
+ },
+ {
+ retry: 2,
+ }
+);
-test("should render correct frames from embedded videos - WebM offthread", async () => {
- const missedFrames = await getMissedFramesforCodec("webm", true);
- expect(missedFrames).toBe(0);
-});
+test(
+ "should render correct frames from embedded videos - WebM offthread",
+ async () => {
+ const missedFrames = await getMissedFramesforCodec("webm", true);
+ expect(missedFrames).toBe(0);
+ },
+ {
+ retry: 2,
+ }
+);
-test("should render correct frames from embedded videos - MP4 onthread", async () => {
- const missedFrames = await getMissedFramesforCodec("mp4", false);
- expect(missedFrames).toBeLessThanOrEqual(0);
-});
+test(
+ "should render correct frames from embedded videos - MP4 onthread",
+ async () => {
+ const missedFrames = await getMissedFramesforCodec("mp4", false);
+ expect(missedFrames).toBeLessThanOrEqual(1);
+ },
+ {
+ retry: 2,
+ }
+);
-test("should render correct frames from embedded videos - MP4 offthread", async () => {
- const missedFrames = await getMissedFramesforCodec("mp4", true);
- expect(missedFrames).toBe(0);
-});
+test(
+ "should render correct frames from embedded videos - MP4 offthread",
+ async () => {
+ const missedFrames = await getMissedFramesforCodec("mp4", true);
+ expect(missedFrames).toBe(0);
+ },
+ {
+ retry: 2,
+ }
+);