🎥 Make videos programmatically with React
fix warnings
Jonny Burger209cf4a17ebb
diff --git a/packages/core/src/test/pixel-format.test.ts b/packages/core/src/test/pixel-format.test.tsindex 4dace37be1..98d13a4663 100644--- a/packages/core/src/test/pixel-format.test.ts+++ b/packages/core/src/test/pixel-format.test.ts@@ -49,14 +49,15 @@ describe('pixel-format tests validateSelectedPixelFormatAndCodecCombination', ()const codecs: Codec[] = ['h264', 'h265', 'vp8', 'vp9'];- formats.forEach((f) =>- codecs.forEach((c) =>- test(`test for valid combination ${f} and ${c}`, () =>+ for (const format of formats) {+ for (const codec of codecs) {+ test(`test for valid combination ${format} and ${codec}`, () => {expect(() =>- validateSelectedPixelFormatAndCodecCombination(f, c)- ).not.toThrow())- )- );+ validateSelectedPixelFormatAndCodecCombination(format, codec)+ ).not.toThrow();+ });+ }+ }const invalidCodecs: Codec[] = ['h264', 'h265'];invalidCodecs.forEach((entry) =>diff --git a/packages/renderer/src/screenshot-task.ts b/packages/renderer/src/screenshot-task.tsindex c2ee674541..5415e630a7 100644--- a/packages/renderer/src/screenshot-task.ts+++ b/packages/renderer/src/screenshot-task.ts@@ -1,5 +1,5 @@import fs from 'fs';-import {Page, ScreenshotOptions} from 'puppeteer-core';+import {CDPSession, Page, ScreenshotOptions, Target} from 'puppeteer-core';import {Internals} from 'remotion';export const _screenshotTask = async (@@ -7,8 +7,8 @@ export const _screenshotTask = async (format: 'png' | 'jpeg',options: ScreenshotOptions): Promise<Buffer | string> => {- const client = (page as any)._client;- const target = (page as any)._target;+ const client = ((page as unknown) as {_client: CDPSession})._client;+ const target = ((page as unknown) as {_target: Target})._target;const perfTarget = Internals.perf.startPerfMeasure('activate-target');