Skip to content

🎥 Make videos programmatically with React

clean more download maps

Jonny Burger3f0df7627bb8
diff --git a/packages/renderer/src/test/get-audio-channels.test.ts b/packages/renderer/src/test/get-audio-channels.test.ts
index 4ba81615cb..4883067766 100644
--- a/packages/renderer/src/test/get-audio-channels.test.ts
+++ b/packages/renderer/src/test/get-audio-channels.test.ts
@@ -79,9 +79,9 @@ test('Get audio channels for video with music', async () => {
test('Throw error if parsing a non video file', () => {
const downloadMap = makeDownloadMap();
const tsFile = path.join(__dirname, '..', 'ffmpeg-flags.ts');
- cleanDownloadMap(downloadMap);
expect(existsSync(tsFile)).toEqual(true);
expect(() =>
getAudioChannelsAndDuration(downloadMap, tsFile, null, process.cwd())
).rejects.toThrow(/Invalid data found when processing input/);
+ cleanDownloadMap(downloadMap);
});
diff --git a/packages/renderer/src/test/render-still.test.ts b/packages/renderer/src/test/render-still.test.ts
index 1c8e7189f9..710e0fef32 100644
--- a/packages/renderer/src/test/render-still.test.ts
+++ b/packages/renderer/src/test/render-still.test.ts
@@ -42,9 +42,9 @@ test('Returns buffer in promise result', async () => {
cleanDownloadMap(downloadMap);
});
-test('Need to pass valid metadata', () => {
+test('Need to pass valid metadata', async () => {
const downloadMap = makeDownloadMap();
- return expect(() =>
+ await expect(() =>
renderStill({
composition: {
width: 1000,
@@ -62,6 +62,7 @@ test('Need to pass valid metadata', () => {
).rejects.toThrow(
/Cannot use frame 200: Duration of composition is 30, therefore the highest frame that can be rendered is 29/
);
+ cleanDownloadMap(downloadMap);
});
test('Catches invalid image format', () => {