TE

Test Renderer

test-renderer

A lightweight test renderer for React and a modern replacement for the deprecated React Test Renderer.

Testing
jest
react
react-19
react-test-renderer
test-renderer
testing
javascript
npm
frontend
open source
Stars
24
Weekly
1.1M
Open issues
0
Bundle
~25 kB

Installation

npm install test-renderer

Code example

import { TestRenderer } from "test-renderer";

export function Example() {
  return (
    <div>
      <h2>Test Renderer</h2>
      <TestRenderer />
    </div>
  );
}

Pros & cons

Pros

  • Actively maintained by Maciej Jastrzebski
  • 1.1M weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 0 open issues on GitHub

FAQs

Alternatives & similar libraries