Skip to content

🎥 Make videos programmatically with React

Update rendering.test.ts

Jonny Burger39ab61f9b025
diff --git a/tests/rendering.test.ts b/tests/rendering.test.ts
index 3cca053b4b..20db9dcd08 100644
--- a/tests/rendering.test.ts
+++ b/tests/rendering.test.ts
@@ -133,7 +133,7 @@ test("Should render a still image if single frame specified", async () => {
const data = info.stderr;
expect(data).toContain("Video: png");
expect(data).toContain("png_pipe");
- await fs.promises.rmdir(outDir, {
+ fs.rmdirSync(outDir, {
recursive: true,
});
});
@@ -231,7 +231,9 @@ test("Should render a video with GIFs", async () => {
const data = info.stderr;
expect(data).toContain("Video: h264");
expect(data).toContain("Duration: 00:00:01.57");
- await fs.promises.unlink(outputPath);
+ fs.rmdirSync(outputPath, {
+ recursive: true,
+ });
});
test("Should fail to render an audio file that doesn't have any audio inputs", async () => {
@@ -280,6 +282,8 @@ test("Dynamic duration should work", async () => {
expect(data).toContain("Video: h264");
const expectedDuration = (randomDuration / 30).toFixed(2);
expect(data).toContain(`Duration: 00:00:0${expectedDuration}`);
- await fs.promises.unlink(outputPath);
+ fs.rmdirSync(outputPath, {
+ recursive: true,
+ });
}
});