web-renderer-test
Visual snapshot testing for web renderer components using vitest fixtures.
- Create test fixtures in
packages/web-renderer/src/test/fixturesthat define a React component, dimensions, frame rate, and duration - Register fixtures in
packages/web-renderer/src/test/Root.tsxto enable preview functionality - Write test cases that render stills using
renderStillOnWeb()and validate output withtestImage()snapshot comparison - Run tests with
bunx vitest src/test/video.test.tsxand update documentation inlimitations.mdxwhen adding new supported properties
The web renderer is in packages/web-renderer and the test suite is in packages/web-renderer/src/test.
It uses visual snapshot testing using vitest. A test file can for example be executed using:
bunx vitest src/test/video.test.tsx
Example
Each test is powered by a fixture in packages/web-renderer/src/test/fixtures.
A fixture looks like this for example:
import {AbsoluteFill} from 'remotion';
const Component: React.FC = () => {
return (
<AbsoluteFill
More from remotion-dev/remotion
writing-docs
Guides for writing and editing Remotion documentation. Use when adding docs pages, editing MDX files in packages/docs, or writing documentation content.
897make-pr
Open a pull request for the current feature
843video-report
Generate a report about a video
799docs-demo
Add an interactive demo to the Remotion documentation. Use when creating a new <Demo> component for docs pages.
665add-expert
Add a new expert to the Remotion experts page
632add-sfx
Add a new sound effect to @remotion/sfx
620