# Pact

JS version of Pact. Pact is a contract testing framework for HTTP APIs and non-HTTP asynchronous messaging systems.

Repository: https://github.com/pact-foundation/pact-js
Canonical: https://ross.abutalabs.com/products/pact
Homepage: https://pact.io
Language: TypeScript
License: NOASSERTION
License Family: other
Topics: pact, consumer-driven-contracts, pact-js, mocha, test-framework, hacktoberfest, smartbear-supported
Last push: 2026-08-26T12:34:41+00:00
Link (homepage): https://pact.io
Link (site_page): https://docs.pact.io

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 99, longevity 100
- inputs: {"age_days": 3743, "days_push": 7, "days_rel": 7, "gap_med": 20, "n_releases_24m": 24}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1803, forks 356 (observed 2026-08-28T04:05:38.274270+00:00)

## What it is
Pact is a code-first contract testing framework that lets consumers define expected interactions with providers via a DSL and mock service, then verifies providers against those contracts. It supports HTTP, gRPC, and async message integrations across many languages, and integrates with the Pact Broker for CI/CD orchestration.

## Use cases
- test that my API client and backend service stay compatible without end-to-end environments
- write consumer driven contract tests for REST APIs
- verify a provider against consumer expectations in CI
- contract test Kafka message integrations
- replace brittle integration test suites for microservices
- orchestrate safe deployments with can-i-deploy and the Pact Broker
- contract test gRPC services

## When to choose
- you have multiple services or a frontend/backend pair that communicate over HTTP, gRPC, or message queues
- you want fast, isolated integration testing instead of full end-to-end environments
- you need to independently deploy microservices with confidence they remain compatible
- you want contract verification wired into CI/CD pipelines

## When to avoid
- you are testing a single monolithic application with no inter-service integrations
- you need full end-to-end system or browser UI testing
- your integrations are with third-party APIs you cannot run or verify locally

## Facets
- artifact type: framework
- maturity: active
- function: testing, e2e-testing, mocking, http-client, middleware
- domain: testing, microservices, apis, developer-tools
- platform: cross-platform, ruby, jvm, python, go, dotnet, cli
- tags: contract-testing, consumer-driven-contracts, pact-broker, microservices-testing, api-testing, message-pacts, grpc, hacktoberfest, devops, nodejs

## Member repositories
- pact-foundation/pact-js (sdk) score 99
- pact-foundation/pact-ruby (sdk) score 98
- pact-foundation/pact-jvm (sdk) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:38.274270+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:47:27.443522+00:00, confidence not recorded.
  - readme: https://github.com/pact-foundation/pact-js (fetched 2026-08-28T04:05:38.274270+00:00, sha 950251e45aae)
  - homepage: https://pact.io (fetched 2026-08-29T10:28:03.734729+00:00, sha f01a6b3b2449)
  - site_page: https://docs.pact.io (fetched 2026-08-29T10:28:03.743986+00:00, sha 5ff59a543180)
- Data as of 2026-08-30T08:39:29.467469+00:00.
