Pact Ruby vs Pact JS: open-source contract testing tools compared
Metrics as of , from the GitHub or GitLab API of each repository. Refreshed monthly.
Summary
Pact Ruby: Ruby RSpec DSL for Pact contract tests over HTTP, gRPC and message transports, built on pact-ffi.
Pact JS: Node.js library for Pact contract tests, with the PactV3 consumer API and Verifier class in the @pact-foundation/pact npm package.
Both are listed under Contract testing. 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; that does not mean the feature is absent.
Side by side
| Fact | Pact Ruby | Pact JS |
|---|---|---|
| Stars | 2,1911 | 1,8151 |
| Forks | 2181 | 3571 |
| Contributors | 941 | 1231 |
| Last release | 2026-09-141 | 2026-09-071 |
| Last commit | 2026-09-181 | 2026-09-221 |
| Commits in 90 days | 151 | 1101 |
| License | MIT1 | MIT1 |
| Primary language | Ruby1 | TypeScript1 |
| Status | active1 | active1 |
| Languages for writing tests | Ruby with RSpec source: README | JavaScript on Node.js (Node 16+ as of pact-js v12) source: README |
| Contract or spec formats | Pact specification, including V4 mixed interactions in a single file source: README | Pact specification versions 2, 3 and 4 (pact-js 10.x and later) source: README |
| Protocols | HTTP, gRPC and async messages (Kafka) source: README | HTTP/REST and event-driven systems source: README |
| CI integration | A :pact RSpec tag separates Pact tests in CI/CD pipelines source: README | CI/CD workflows through Pact Broker source: README |
| Install method | RubyGems (gem "pact") source: README | npm (npm install --save-dev @pact-foundation/pact) source: README |
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.
Pact Ruby
Fits projects that test contracts between Ruby service consumers and providers; its README describes a DSL for writing contract tests in Ruby with RSpec. source: README
Pact JS
Fits projects that write consumer-driven contract tests for APIs in JavaScript; its README describes a consumer test that produces a contract shared with the provider. source: README
More on these tools
Sources
- GitHub REST API: repository, read
- GitHub REST API: repository, read
- GitHub REST API: contributors, read
- GitHub REST API: contributors, read
- GitHub REST API: latest release, read
- GitHub REST API: latest release, read
- GitHub REST API: commits, read
- GitHub REST API: commits, read
- README, read
- README, read
Documented facts collected 2026-09-22. See the methodology for how metrics and facts are gathered.