http-mocking

Official

HTTP mocking with nock - only allowed library.

Authorzerobias-org
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Keeps tests deterministic by mocking HTTP requests with nock, avoiding flaky network calls.

Core Features & Use Cases

  • Strict HTTP-level mocking: Mock requests at the network layer using nock, avoiding internal method stubs.
  • Accurate request matching: Validate method, path, headers, and query parameters to reflect real API interactions.
  • Reliable cleanup and verification: Use afterEach to clean mocks and verify with isDone().
  • Use Case: Write unit tests that intercept external API calls and assert the expected payloads are returned without real network access.

Quick Start

Run a unit test that uses nock to intercept an HTTP GET to https://api.example.com/users and verify the mock is consumed.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: http-mocking
Download link: https://github.com/zerobias-org/module/archive/main.zip#http-mocking

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.