</>PackageGraphPackageGraph

test-renderer

npmv1.2.0TypeScript

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

Safe to adopt

Yes — test-renderer scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 146 days ago. 11 releases in the last 2 years.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • BMaintenance: grade B, Good.

    Last published 146 days ago. 11 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Pulls in 3 transitive packages, about 1.9 MB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding test-renderer to a project.

2
Direct dependencies

Runtime packages this one declares itself.

3
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

1.9 MB
Install size

Unpacked size of this package plus its entire runtime tree.

2
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

MIT

Every license you inherit by installing test-renderer, not just its own. Check this before a legal review, not after.

Compatibility

Node.js
No constraint declared
Module format
ESM + CommonJS
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the test-renderer README.

import { createRoot } from "test-renderer";
import { act } from "react";

test("renders a component", async () => {
  const renderer = createRoot();

  // Use `act` in async mode to allow resolving all scheduled React updates
  await act(async () => {
    renderer.render(<div>Hello!</div>);
  });

  expect(renderer.container).toMatchInlineSnapshot(`
    <>
      <div>
Example truncated — see the full README.

test-renderer vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
test-rendererthis page01MIT4 months ago
@testing-library/jest-dom56M6MIT1 day ago
jest42.1M70MIT1 day ago
@testing-library/user-event35.3M4MIT1 day ago
jest-cli03MIT1 day ago
@jest/core02MIT1 day ago

Dependencies

Declared by test-renderer v1.2.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (16)

@eslint/js ^10.0.1@jest/globals ^30.3.0@release-it/conventional-changelog ^10.0.6@types/jest ^30.0.0@types/node ^25.6.0@types/react ^19.2.14eslint ^10.2.0eslint-plugin-simple-import-sort ^13.0.0jest ^30.3.0oxfmt ^0.44.0react ^19.2.5release-it ^19.2.4ts-jest ^29.4.9tsdown ^0.21.7typescript ~6.0.2typescript-eslint ^8.58.1

Used by

Popular packages that depend on test-renderer.

Relationship graph

Dependencies (left) and dependents (right) of test-renderer.

Frequently installed together

Release history

11 releases in the last two years, typically about 1 day apart.

Recent versions of test-renderer
VersionPublishedSizeLicense
1.2.0latest4 months ago185 KBMIT
1.1.04 months ago185 KBMIT
1.0.04 months ago183 KBMIT
0.16.05 months ago178 KBMIT
0.15.06 months ago230 KBMIT
0.14.07 months ago189 KBMIT
0.13.28 months ago192 KBMIT
0.13.18 months ago192 KBMIT
0.13.08 months ago188 KBMIT
0.12.08 months ago185 KBMIT
0.11.08 months ago183 KBMIT

Overview

test-renderer is an npm package that a lightweight test renderer for React and a modern replacement for the deprecated React Test Renderer. It has 1 known dependents in the graph. The latest version is 1.2.0, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need a lightweight test renderer for React and a modern replacement for the deprecated React Test Renderer and value a focused solution.

When not to use it

Consider an alternative if you need to minimize your dependency tree, or if a more actively-maintained option better fits your npm stack.

Pros

  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).

Cons

  • Large dependency tree (19 direct dependencies) increases install size and audit surface.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Frequently asked questions

Should I use test-renderer?

Yes — test-renderer scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 146 days ago. 11 releases in the last 2 years.

How do I install test-renderer?

Run `npm install test-renderer` to add test-renderer to your npm project.

How many dependencies does test-renderer have?

test-renderer declares 19 direct dependencies and pulls in 3 packages in total once its runtime tree is resolved totalling about 1.9 MB on disk.

What license is test-renderer released under?

test-renderer is distributed under the MIT license.

How popular is test-renderer?

npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on test-renderer.

Is test-renderer still maintained?

The most recent release of test-renderer (v1.2.0) was published 4 months ago.

Does test-renderer run install scripts?

No. test-renderer does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.