web-renderer-test

remotion-dev/remotion · updated Apr 8, 2026

$npx skills add https://github.com/remotion-dev/remotion --skill web-renderer-test
0 commentsdiscussion
summary

Visual snapshot testing for web renderer components using vitest fixtures.

  • Create test fixtures in packages/web-renderer/src/test/fixtures that define a React component, dimensions, frame rate, and duration
  • Register fixtures in packages/web-renderer/src/test/Root.tsx to enable preview functionality
  • Write test cases that render stills using renderStillOnWeb() and validate output with testImage() snapshot comparison
  • Run tests with bunx vitest src/test/video.test.tsx and update docum
skill.md

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
      style={{
        justifyContent: 'center',
        alignItems: 'center',
      }}
    >
      <div
        style={{
          backgroundColor: 'red',
          width: 100,
          height: 100,
          borderRadius: 20,
        }}
      />
    </AbsoluteFill>
  );
};

export const backgroundColor = {
  component: Component,
  id: 'background-color',
  width: 200,
  height: 200,
  fps: 25,
  durationInFrames: 1,
} as const;

The corresponding test looks like this:

import {test} from 'vitest';
import {renderStillOnWeb} from '../render-still-on-web';
import {backgroundColor} from './fixtures/background-color';
import {testImage} from './utils';

test('should render background-color', async () => {
  const blob = await renderStillOnWeb({
    licenseKey: 'free-license',
    composition: backgroundColor,
    frame: 0,
    inputProps: {},
    imageFormat: 'png',
  });

  await testImage({blob, testId: 'background-color'});
});

Adding a new test

  1. Add a new fixture in packages/web-renderer/src/test/fixtures.
  2. Important: Add the fixture to packages/web-renderer/src/test/Root.tsx to add a way to preview it.
  3. Add a new test in packages/web-renderer/src/test.
  4. Run bunx vitest src/test/video.test.tsx to execute the test.
  5. Important: Update packages/docs/docs/client-side-rendering/limitations.mdx to reflect the newly supported property.

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.629 reviews
  • Pratham Ware· Dec 4, 2024

    web-renderer-test has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Advait Jain· Nov 15, 2024

    web-renderer-test has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Aarav Harris· Oct 6, 2024

    Useful defaults in web-renderer-test — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Sakshi Patil· Sep 25, 2024

    Solid pick for teams standardizing on skills: web-renderer-test is focused, and the summary matches what you get after install.

  • Noah Wang· Sep 21, 2024

    web-renderer-test is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Olivia Robinson· Sep 17, 2024

    web-renderer-test reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Chaitanya Patil· Aug 16, 2024

    We added web-renderer-test from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Olivia Park· Aug 12, 2024

    web-renderer-test fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Noah Li· Aug 8, 2024

    I recommend web-renderer-test for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Jin Gill· Jul 27, 2024

    Keeps context tight: web-renderer-test is the kind of skill you can hand to a new teammate without a long onboarding doc.

showing 1-10 of 29

1 / 3