COMPARISON · TESTING

@testing-library/react vs. jasmine-core

Side-by-side comparison · 9 metrics · 14 criteria

@testing-library/react v16.3.3 · MIT
Weekly Downloads
98.8M
Stars
19.7K
Gzip Size
100.5 kB
License
MIT
Last Updated
10mo ago
Open Issues
87
Forks
1.2K
Unpacked Size
339.6 kB
Dependencies
13
jasmine-core v7.0.2 · MIT
Weekly Downloads
6.3M
Stars
15.8K
Gzip Size
33.3 kB
License
MIT
Last Updated
9mo ago
Open Issues
8
Forks
2.2K
Unpacked Size
445.4 kB
Dependencies
1
DOWNLOAD TRENDS

@testing-library/react vs jasmine-core downloads · last 12 months

Download trends for @testing-library/react and jasmine-core2 download series from Nov 2025 to Oct 2026. Use left and right arrow keys to inspect monthly values.081.8M163.6M245.3M327.1MNov 2025FebMayAugOct 2026
@testing-library/react
jasmine-core
FEATURE COMPARISON

Criteria · @testing-library/react vs jasmine-core

Testing Layer
@testing-library/react
React-specific utility layer that can sit within a framework setup
jasmine-core
Framework layer for organizing and executing specs
Test Structure
@testing-library/react
Supplies component testing utilities, not a complete test framework
jasmine-core ✓
Defines Jasmine spec and expectation conventions
Complementary Use
@testing-library/react
Can provide React rendering utilities within a Jasmine-based setup
jasmine-core
Can provide the spec framework around React-specific test utilities
React DOM Testing
@testing-library/react ✓
Provides React-aware rendering utilities and DOM-facing component tests
jasmine-core
Does not provide React component rendering utilities
React Test Setup Fit
@testing-library/react ✓
Directly addresses React rendering and DOM test needs
jasmine-core
Requires separate React-aware rendering utilities for component tests
Framework Independence
@testing-library/react
Does not define a full spec-running framework
jasmine-core ✓
Provides Jasmine framework conventions
Test Target Flexibility
@testing-library/react
Specialized for React DOM component tests
jasmine-core ✓
Applicable to JavaScript tests beyond React UI
User-Visible Assertions
@testing-library/react ✓
Encourages queries and checks against rendered DOM behavior
jasmine-core
Provides general test expectations without React-specific DOM queries
Browser and Node.js Scope
@testing-library/react
Targets React DOM testing workflows
jasmine-core ✓
Explicitly serves browser and Node.js testing
General JavaScript Testing
@testing-library/react
Focused on testing React DOM components
jasmine-core ✓
Framework scope covers browser and Node.js JavaScript tests
Gzip Distribution Footprint
@testing-library/react
Larger listed gzip size at 100.5 kB
jasmine-core ✓
Smaller listed gzip size at 33.3 kB
Component Lifecycle Workflow
@testing-library/react ✓
Built around rendering and managing React components in tests
jasmine-core
Does not manage React component rendering
Implementation Detail Isolation
@testing-library/react ✓
Promotes tests centered on observable DOM behavior
jasmine-core
General framework whose assertions can be applied to varied test targets
Unpacked Distribution Footprint
@testing-library/react ✓
Smaller listed unpacked size at 339.6 kB
jasmine-core
Larger listed unpacked size at 445.4 kB
VERDICT

@testing-library/react is designed for testing React components through the DOM as users encounter them. Its guiding approach favors queries and interactions that reflect rendered output rather than assertions about component internals, making it a focused choice for React teams that want tests to reinforce accessible, user-visible behavior. It is not a general-purpose JavaScript test framework; it supplies React-oriented testing utilities within a testing setup chosen separately.

jasmine-core provides a JavaScript testing framework for browsers and Node.js, with a scope that is not limited to React or even to UI code. Its central role is to organize specs and expectations and provide the framework mechanics for running tests, so it suits teams seeking a Jasmine-based test structure across different JavaScript targets. Choose it for that framework-level role rather than for React-specific DOM rendering utilities.

The principal architectural distinction is the layer each package addresses. @testing-library/react renders React components and lets tests locate elements in the resulting DOM, then exercise behavior through that user-facing surface; jasmine-core supplies test-suite and expectation conventions, rather than React rendering or component queries. A test can therefore use Jasmine-style specs around React DOM tests, but the packages are not interchangeable alternatives at the same layer.

Their extension boundaries also differ. @testing-library/react centers its API on rendering React trees, obtaining rendered DOM, and managing the component testing lifecycle, which gives React-specific tests a direct path from setup to visible output. jasmine-core centers on defining and executing specs and expectations across browser and Node.js contexts; it offers a broader framework boundary, but does not itself provide the React-aware rendering workflow that @testing-library/react targets.

For day-to-day authoring, @testing-library/react asks React developers to think in terms of rendered elements and observable interactions, a model that can discourage brittle assertions tied to implementation details. jasmine-core asks developers to learn its spec and expectation structure, which is useful even when the subject under test is not a component. The supplied package data does not specify TypeScript behavior or editor tooling, so those should be checked against the particular project setup rather than treated as a deciding advantage here.

Distribution size may matter when package contents or shipped test tooling are constrained: jasmine-core is listed at 33.3 kB gzip, compared with 100.5 kB for @testing-library/react, while its unpacked size is larger at 445.4 kB versus 339.6 kB. These figures describe different size views and do not establish runtime speed or the size of a complete test environment. In practice, @testing-library/react is a test utility, so its gzip figure should not be read as a production UI payload without checking how the project includes it.

Pick @testing-library/react when the main requirement is testing React components through their rendered DOM, such as checking that a form, dialog, or stateful view presents the expected output after interaction. Pick jasmine-core when the requirement is a JavaScript testing framework usable in browser and Node.js environments, especially when tests need a Jasmine spec-and-expectation structure beyond React components. If a project needs both React-specific rendering and Jasmine conventions, evaluate them as complementary layers and verify that the existing test setup connects them.

The adoption and maintenance signals point in different directions: @testing-library/react has higher weekly downloads and more GitHub stars, while jasmine-core has fewer open issues and more forks in the supplied data. Those signals do not determine which API fits a codebase, and they do not establish compatibility with a particular runner or React version. For migration, move component tests toward @testing-library/react when the intended shift is from implementation-focused checks to DOM-observable behavior; move toward jasmine-core when the intended shift is to Jasmine’s framework conventions, not as a substitute for React rendering utilities.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

RELATED COMPARISONS 8
@testing-library/react vs nightwatch ★ 31.6K · 98.9M/wk @testing-library/react vs jest ★ 65.2K · 160.9M/wk @testing-library/react vs mocha ★ 42.6K · 113.3M/wk @testing-library/react vs fast-check ★ 25.0K · 174.2M/wk @testing-library/react vs selenium-webdriver ★ 54.3K · 100.9M/wk @testing-library/react vs cypress ★ 70.7K · 106.3M/wk @testing-library/react vs vitest ★ 37.1K · 288.5M/wk @testing-library/react vs chai ★ 27.9K · 315.6M/wk