test-renderer
npmv1.2.0TypeScriptA 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.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Licenses in the dependency tree
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>test-renderer vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| test-rendererthis page | 0 | 1 | MIT | 4 months ago |
| @testing-library/jest-dom | 56M | 6 | MIT | 1 day ago |
| jest | 42.1M | 70 | MIT | 1 day ago |
| @testing-library/user-event | 35.3M | 4 | MIT | 1 day ago |
| jest-cli | 0 | 3 | MIT | 1 day ago |
| @jest/core | 0 | 2 | MIT | 1 day ago |
Dependencies
Declared by test-renderer v1.2.0. Runtime dependencies are installed with the package; dev dependencies are not.
Peer (1)
Dev (16)
Used by
Popular packages that depend on test-renderer.
Relationship graph
Dependencies (left) and dependents (right) of test-renderer.
Frequently installed together
React is a JavaScript library for building user interfaces.
Delightful JavaScript Testing.
A framework for building native apps using React
An AST-based pattern checker for JavaScript.
TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files
TypeScript definitions for react
The tiniest and the fastest library for terminal output formatting with ANSI colors
A set of utility functions for expect and related packages
Jest plugin to use babel for transformation.
Jest preset for React Native apps
Babel preset for TypeScript.
Strip redundant indentation and indent the string
Release history
11 releases in the last two years, typically about 1 day apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.2.0latest | 4 months ago | 185 KB | MIT |
| 1.1.0 | 4 months ago | 185 KB | MIT |
| 1.0.0 | 4 months ago | 183 KB | MIT |
| 0.16.0 | 5 months ago | 178 KB | MIT |
| 0.15.0 | 6 months ago | 230 KB | MIT |
| 0.14.0 | 7 months ago | 189 KB | MIT |
| 0.13.2 | 8 months ago | 192 KB | MIT |
| 0.13.1 | 8 months ago | 192 KB | MIT |
| 0.13.0 | 8 months ago | 188 KB | MIT |
| 0.12.0 | 8 months ago | 185 KB | MIT |
| 0.11.0 | 8 months ago | 183 KB | MIT |
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
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.