Back to Skills

web-renderer-test

Add a test case to the web renderer

52,822stars3,811forksUpdated 7/11/2026

Security Assessment

Safe(100/100)
Security Score100/100

About web-renderer-test

A focused contributor guide for adding test cases to Remotion's web renderer, the package that renders compositions client-side in the browser. The renderer source lives in packages/web-renderer and its test suite in packages/web-renderer/src/test, where verification is done through visual snapshot testing powered by vitest. A single test file can be run with a command such as bunx vitest src/test/video.test.tsx. Each test is driven by a fixture stored under packages/web-renderer/src/test/fixtures. A fixture exports a React component, typically wrapping content in Remotion's AbsoluteFill, together with metadata like an id, width, height, fps, and durationInFrames, marked as a const object. The paired test imports renderStillOnWeb, passes the fixture as the composition alongside a licenseKey (for example free-license), a frame index, inputProps, and an imageFormat such as png, then hands the resulting blob to a testImage helper keyed by a testId so the rendered output is snapshot-compared. The documented procedure for adding a new test has five steps: create a new fixture in the fixtures directory; register that fixture in packages/web-renderer/src/test/Root.tsx so it can be previewed; add a new test in packages/web-renderer/src/test; run the vitest command to execute it; and update packages/docs/docs/client-side-rendering/limitations.mdx to reflect any newly supported property. The two steps flagged as important, wiring the fixture into Root.tsx and keeping the limitations documentation current, are easy to overlook but keep the preview harness and the public docs in sync with what the renderer actually supports. Use this when contributing coverage for a new CSS property, component behavior, or rendering feature in the web renderer, or when learning how its snapshot testing setup is organized.

FAQ

What testing framework does the web renderer use?

It uses vitest for visual snapshot testing; a test file can be run with a command like bunx vitest src/test/video.test.tsx.

What is a fixture and where does it go?

A fixture is a React component plus metadata (id, width, height, fps, durationInFrames) that defines what to render; it lives in packages/web-renderer/src/test/fixtures.

How is a rendered frame actually checked?

The test calls renderStillOnWeb with the fixture as the composition (plus licenseKey, frame, inputProps, and imageFormat) and passes the resulting blob to the testImage helper keyed by a testId for snapshot comparison.

What are the steps to add a new test?

Add a fixture, register it in Root.tsx for preview, add a test in the test directory, run the vitest command, and update the limitations.mdx docs to reflect newly supported properties.

Why do I need to edit Root.tsx and the limitations docs?

Both are flagged as important: registering the fixture in Root.tsx makes it previewable, and updating packages/docs/docs/client-side-rendering/limitations.mdx keeps the documented list of supported properties accurate.

Install web-renderer-test

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill