Skip to content
Back to skills

Nock Http Server Mocking Nodejs

ASecurity

Nock is an HTTP server mocking and expectations library for Node.js that intercepts outgoing HTTP requests and provides programmable responses. With over 13,000 GitHub stars and 5.5 million weekly npm downloads, it is one of the most widely used testing utilities in the JavaScript ecosystem.

  • 36 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added June 8, 2026
ai-agentsjavascriptgojavanodenodejstestinggitsecuritydocumentation

Works with

  • cli

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned June 8, 2026

npx -y skills add agentskillexchange/skills --skill nock-http-server-mocking-nodejs --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nock Http Server Mocking Nodejs?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nock Http Server Mocking Nodejs
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/agentskillexchange-nock-http-server-mocking-nodejs/badge)](https://www.skillsdirectory.com/skills/agentskillexchange-nock-http-server-mocking-nodejs)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "Nock HTTP Server Mocking and Expectations Library for Node.js"
slug: "nock-http-server-mocking-nodejs"
description: "Nock is an HTTP server mocking and expectations library for Node.js that intercepts outgoing HTTP requests and provides programmable responses. With over 13,000 GitHub stars and 5.5 million weekly npm downloads, it is one of the most widely used testing utilities in the JavaScript ecosystem."
github_stars: 13101
verification: "security_reviewed"
source: "https://github.com/nock/nock"
author: "nock"
category: "Code Quality & Review"
framework: "Multi-Framework"
tool_ecosystem:
  github_repo: "nock/nock"
  github_stars: 13101
  npm_package: "nock"
  npm_weekly_downloads: 6556478
---

# Nock HTTP Server Mocking and Expectations Library for Node.js

Nock is an HTTP server mocking and expectations library for Node.js that intercepts outgoing HTTP requests and provides programmable responses. With over 13,000 GitHub stars and 5.5 million weekly npm downloads, it is one of the most widely used testing utilities in the JavaScript ecosystem.

## Installation

Use the upstream install or setup path that matches your environment:
- $ npm install --save-dev nock

Requirements and caveats from upstream:
- HTTP server mocking and expectations library for Node.js
- [Node version support](#node-version-support)
- Nock works by overriding Node's http.request function. Also, it overrides http.ClientRequest too to cover for modules that use it directly.

Basic usage or getting-started notes:
- [Usage](#usage)
- [Usage](#usage-1)
- [Example](#example)

- Source: https://github.com/nock/nock
- Extracted from upstream docs: https://raw.githubusercontent.com/nock/nock/HEAD/README.md

## Documentation

- https://github.com/nock/nock#readme

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/nock-http-server-mocking-nodejs/)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.