skills/smithery.ai/http-mocking

http-mocking

Installation
SKILL.md

Nock HTTP Mocking Patterns

Critical Rule: ONLY nock for HTTP Mocking

This is a CRITICAL rule that MUST be enforced:

✅ ONLY nock is allowed for HTTP mocking ❌ NEVER use jest.mock, sinon, or fetch-mock

See failure-conditions skill Rule 4 for enforcement.

Core Principles

  1. Mock at HTTP level - Mock the network request, not internal methods
  2. Match requests accurately - Include method, path, headers, query params
  3. Return realistic responses - Use response formats matching real API
  4. Clean up after tests - Use afterEach(() => nock.cleanAll())
  5. Verify mocks called - Assert expect(nock.isDone()).toBe(true)
Installs
1
First Seen
Apr 1, 2026
http-mocking from smithery.ai