CheckOps home

Tools directory

P

CheckOps

PactumJS

PactumJS is an MIT-licensed REST API testing tool for Node.js that covers component, contract and end-to-end API tests, with a fluent API and a built-in mock server.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

Introduction

PactumJS is a REST API testing tool used to automate end-to-end, integration, contract and component (service-level) tests, according to its README. It provides a fluent JavaScript API for requests and expectations and works with any test runner such as Mocha, Jest or Cucumber.

A test chains calls like spec().get(url).expectStatus(200).expectJsonLike({...}). Data can be stored from responses and reused, data templates and maps make tests concise, and expectations include JSON schema, JSON matching and response time.

PactumJS can also act as a standalone mock server, and its interaction model can generate contracts for contract testing.

In the quality loop it fits API, integration and contract stages for Node.js teams.

The source code is at pactumjs/pactum on GitHub under the MIT licence, with about 623 stars; the most recent commit was on 11 August 2026.

Features

  1. Fluent API: Readable request and expectation chains.
  2. Many expectations: Status, headers, JSON, schema, and timing.
  3. Data management: Templates, maps and stores.
  4. Mock server: Run a standalone mock server.
  5. Runner agnostic: Mocha, Jest, Cucumber and others.

Pros

  1. All test levels: One library from component to end-to-end tests.
  2. Free to use: Open source under the MIT licence, so the core tool costs nothing to use.
  3. Actively maintained: The repository had commits as recent as 11 August 2026.

Cons

  1. Small community: About 600 GitHub stars.
  2. JavaScript only: Node.js projects only.
const { spec } = require('pactum');
it('gets a user', async () => {
  await spec().get('http://localhost:3000/users/1')
    .expectStatus(200)
    .expectJsonLike({ id: 1 });
});

Resources:

Pricing

PactumJS is free and open source under the MIT licence.

  1. Node.js teams writing API tests in code.
  2. Not a fit for non-JavaScript stacks.

Conclusion

PactumJS is a capable, actively maintained API testing library with a built-in mock server.

On CheckOps, PactumJS is filed under the API & contract testing and Integration testing stages. Related tools listed here include SuperTest, Frisby, Rest-Assured, Pact, Karate and Newman. Before choosing, compare them on licence, supported languages and platforms, hosting model, and how well each fits your existing CI pipeline. Facts on this page were checked against the official website, documentation and repository on 11 November 2026; statements the vendor makes about its own product are marked as vendor claims.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with PactumJS side by side.