🎥 Make videos programmatically with React
fixed tests
bennoc9d5cd575f57
diff --git a/packages/docs/docs/renderer/render-still.md b/packages/docs/docs/renderer/render-still.mdindex 83d40fdd24..b36089afc7 100644--- a/packages/docs/docs/renderer/render-still.md+++ b/packages/docs/docs/renderer/render-still.md@@ -87,7 +87,7 @@ From v3.2.27, negative values are allowed, with `-1` being the last frame._optional - default: "png"_-Which output format the image should have, either `png` or `jpeg`.+Which output format the image should have, either `png`, `jpeg` or `pdf`.### `scale?`diff --git a/packages/docs/docs/stills.md b/packages/docs/docs/stills.mdindex 8fc65e666f..477de49402 100644--- a/packages/docs/docs/stills.md+++ b/packages/docs/docs/stills.md@@ -23,7 +23,7 @@ You can use the [`npx remotion still`](/docs/cli/#npx-remotion-still) command tonpx remotion still --props='{"custom": "data"}' my-comp out.png```-You can use the `--image-format` flag to determine the output format. The default format is `png`, with `jpeg` being the other option.+You can use the `--image-format` flag to determine the output format. The default format is `png`, with `jpeg` and `pdf` being the other options.By default the frame with number of a composition is being rendered, you can control it using the `--frame` flag.diff --git a/packages/lambda/src/api/render-still-on-lambda.ts b/packages/lambda/src/api/render-still-on-lambda.tsindex 9a5df4710f..510a50a81d 100644--- a/packages/lambda/src/api/render-still-on-lambda.ts+++ b/packages/lambda/src/api/render-still-on-lambda.ts@@ -18,7 +18,7 @@ export type RenderStillOnLambdaInput = {serveUrl: string;composition: string;inputProps: unknown;- imageFormat: StillImageFormat;+ imageFormat: Exclude<StillImageFormat, 'pdf'>; // TODO figure out how lambda worksprivacy: Privacy;maxRetries?: number;envVariables?: Record<string, string>;diff --git a/packages/renderer/src/screenshot-task.ts b/packages/renderer/src/screenshot-task.tsindex 97aafb3cae..2e9507ca17 100644--- a/packages/renderer/src/screenshot-task.ts+++ b/packages/renderer/src/screenshot-task.ts@@ -51,7 +51,7 @@ export const screenshotTask = async ({marginLeft: 0,marginRight: 0,scale: 1,- printBackground: true,+ printBackground: !omitBackground,});} else {result = await client.send('Page.captureScreenshot', {diff --git a/packages/renderer/src/test/render-still.test.ts b/packages/renderer/src/test/render-still.test.tsindex 710e0fef32..792c9400e9 100644--- a/packages/renderer/src/test/render-still.test.ts+++ b/packages/renderer/src/test/render-still.test.ts@@ -82,5 +82,5 @@ test('Catches invalid image format', () => {output: '/file/output.png',serveUrl: 'https://gleaming-wisp-de5d2a.netlify.app/',})- ).rejects.toThrow(/Image format should be either "png" or "jpeg"/);+ ).rejects.toThrow(/Image format should be either "png", "jpeg" or "pdf"/);});diff --git a/packages/renderer/src/test/validate-image-format.test.ts b/packages/renderer/src/test/validate-image-format.test.tsindex 0b9dd06a48..788bb81115 100644--- a/packages/renderer/src/test/validate-image-format.test.ts+++ b/packages/renderer/src/test/validate-image-format.test.ts@@ -4,7 +4,8 @@ import {validateNonNullImageFormat} from '../image-format';test('"none" is not a valid image format', () => {expect(() => validateNonNullImageFormat('jpeg')).not.toThrow();expect(() => validateNonNullImageFormat('png')).not.toThrow();+ expect(() => validateNonNullImageFormat('pdf')).not.toThrow();expect(() => validateNonNullImageFormat('none')).toThrow(- /Image format should be either "png" or "jpeg"/+ /Image format should be either "png", "jpeg" or "pdf"/);});