Suggest a tool

Jest vs GoogleTest: open-source unit testing and test runners tools compared

Metrics as of , from the GitHub or GitLab API of each repository. Refreshed monthly.

Summary

Jest: JavaScript testing framework with a CLI, watch mode, matchers and snapshot testing.

GoogleTest: C++ xUnit test framework bundled with GoogleMock, with death tests, parameterized tests and automatic test discovery.

Both are listed under Unit testing and test runners. The table gives repository metrics from the GitHub API with their fetch date, then the documented facts used for every comparison in this category, each linked to the README or docs page it comes from. A cell reads "not documented" when the fact was not found in the project's documentation (1 of 12 fact cells here); that does not mean the feature is absent.

Side by side

Jest and GoogleTest: metrics and documented facts, in the fixed row order used for unit testing and test runners comparisons.
FactJestGoogleTest
Stars45,463139,5721
Forks6,725110,8971
Contributors1,76715071
Last release2026-09-1812026-08-101
Last commit2026-09-1812026-09-171
Commits in 90 days1121941
LicenseMIT1BSD-3-Clause1
Primary languageTypeScript1C++1
Statusactive1active1
Languages for writing testsJavaScript; TypeScript via Babel or ts-jest source: READMEC++ (the 1.18.x branch requires C++17) source: README
Test authoring formatCode (test files using test() and expect() matchers) source: READMECode (C++ TEST() and TEST_F() macros with assertions) source: Docs: GoogleTest Primer
Parallel or distributed executionWorker pool sized with --maxWorkers; test suite sharding with --shard source: Docs: Jest CLI OptionsTest sharding across machines with GTEST_TOTAL_SHARDS and GTEST_SHARD_INDEX source: Docs: Advanced GoogleTest Topics
CI integration--ci option for CI environments (new snapshots fail instead of being written) source: Docs: Jest CLI Optionsnot documentednot found in the project's documentation as of
Report formatsCoverage reporters clover, JSON, lcov and text by default; default, summary and github-actions test reporters source: Docs: Configuring JestXML (based on the junitreport Ant task) and JSON via --gtest_output source: Docs: Advanced GoogleTest Topics
Install methodnpm (npm install --save-dev jest) or yarn (yarn add --dev jest) source: READMECMake build, standalone or inside an existing CMake project source: Docs: Generic Build Instructions

1 Fetched from the GitHub or GitLab API on . Hover a value for its own date.

When each fits

Written from each project's documented scope, not from preference. Neither tool is ranked.

Jest

Fits projects that test JavaScript code, including snapshot tests; its README describes a JavaScript testing solution that works out of the box for most JavaScript projects. source: README

GoogleTest

Fits projects that write unit tests in C++; its README describes automatic discovery and running of tests without manual registration. source: README

More on these tools

Sources

  1. GitHub REST API: repository, read
  2. GitHub REST API: repository, read
  3. GitHub REST API: contributors, read
  4. GitHub REST API: contributors, read
  5. GitHub REST API: latest release, read
  6. GitHub REST API: latest release, read
  7. GitHub REST API: commits, read
  8. GitHub REST API: commits, read
  9. README, read
  10. README, read
  11. Docs: GoogleTest Primer, read
  12. Docs: Jest CLI Options, read
  13. Docs: Advanced GoogleTest Topics, read
  14. Docs: Configuring Jest, read
  15. Docs: Generic Build Instructions, read

Documented facts collected 2026-09-22. See the methodology for how metrics and facts are gathered.