awesome-repositories.com
Blog
awesome-repositories.com

Descubre los mejores repositorios open-source con nuestra búsqueda potenciada por IA.

ExplorarBúsquedas curadasAlternativas open-sourceSoftware autohospedableBlogMapa del sitio
ProyectoAcerca deCómo clasificamosPrensaServidor MCP
Aviso legalPrivacidadTérminos
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
pgte avatar

pgte/nock

0
View on GitHub↗
13,108 estrellas·757 forks·JavaScript·MIT·3 vistas

Nock

Nock is a Node.js HTTP mocking library used to intercept outgoing network requests and return predefined responses. It functions as a network request interceptor and HTTP mock server, allowing developers to simulate external API behavior for automated testing without making live network calls.

The project includes an API fixture recorder to capture real network interactions and save them as reusable data files for playback. It also features a network latency simulator that introduces artificial delays to outgoing HTTP responses to verify timeout handling and race conditions.

The library provides capabilities for integration test isolation by blocking unplanned outbound traffic and restricting requests to unmocked hosts. It supports network request validation to verify the parameters and headers sent to specific endpoints, and employs request matching filters to target dynamic hostnames, paths, and request bodies.

Features

  • API Request Mocking - Provides tools to intercept network requests and simulate server responses to mimic external API behavior.
  • Response Recordings - Returns pre-recorded fixtures or predefined data packets to the application instead of making live network calls.
  • Request Matching Engines - Employs a matching engine to target dynamic hostnames, paths, and request bodies for selecting correct mock responses.
  • Network Request Interceptors - Captures and redirects outbound traffic to simulate external API behavior for automated testing.
  • HTTP Mocking Libraries - Provides a Node.js library for intercepting outgoing HTTP requests and returning predefined responses.
  • API Response Recordings - Provides a utility to record real network interactions and save them as reusable data files for playback.
  • HTTP Mock Servers - Functions as a simulated server environment that validates request expectations and returns mock data.
  • Network Fixture Recorders - Captures real HTTP interactions from a live system to create reusable mock data for development and testing.
  • Network Interaction Recorders - Captures real network interactions and saves them as reusable data files for playback during tests.
  • Response Simulators - Simulates specific server behaviors, such as custom error codes or artificial network latency, to test application resilience.
  • HTTP Mocking - Intercepts network requests to return predefined responses and isolate application logic from external services.
  • Mock Expectation Verifiers - Validates that specific network requests occurred and asserts that all expected calls were completed.
  • Request-Response Interceptors - Redirects traffic from the native network stack to a virtual response handler based on the target hostname.
  • Request Validation - Verifies that the application sends the correct parameters and headers to specific endpoints.
  • Module Monkey Patching - Overrides core Node.js HTTP and HTTPS modules to intercept outgoing requests before they reach the network.
  • Outbound Network Blockers - Blocks requests to unmocked hosts to prevent unexpected outbound network calls during test execution.
  • Network Latency Simulators - Introduces artificial delays to outgoing HTTP responses to verify timeout handling and race conditions.
  • Test Isolation - Prevents external dependencies from affecting test results by simulating API behavior and blocking unplanned outbound traffic.
  • Mock State Resetting - Maintains a global map of active mocks and expectations that can be cleared or reset between test cycles.
  • Latency and Chunking Simulators - Introduces configurable millisecond delays to HTTP responses to verify timeout handling and race conditions.
  • Lifecycle Management - Provides controls to start, stop, or reset network interceptors to maintain a clean state between test scenarios.
  • Frameworks de pruebas - HTTP mocking and expectations.

Historial de estrellas

Gráfico del historial de estrellas de pgte/nockGráfico del historial de estrellas de pgte/nock

Búsqueda con IA

Explora más repositorios increíbles

Describe lo que necesitas en lenguaje sencillo: la IA clasifica miles de proyectos open-source curados por relevancia.

Start searching with AI

Preguntas frecuentes

¿Qué hace pgte/nock?

Nock is a Node.js HTTP mocking library used to intercept outgoing network requests and return predefined responses. It functions as a network request interceptor and HTTP mock server, allowing developers to simulate external API behavior for automated testing without making live network calls.

¿Cuáles son las características principales de pgte/nock?

Las características principales de pgte/nock son: API Request Mocking, Response Recordings, Request Matching Engines, Network Request Interceptors, HTTP Mocking Libraries, API Response Recordings, HTTP Mock Servers, Network Fixture Recorders.

¿Qué alternativas de código abierto existen para pgte/nock?

Las alternativas de código abierto para pgte/nock incluyen: nock/nock — nock is a Node.js HTTP mocking library and request interceptor. It captures outgoing network traffic to specific hosts… getsentry/responses — Responses is a Python mocking library designed to intercept outgoing HTTP calls made with the Requests library to… requestly/requestly. alisoftware/ohhttpstubs — OHHTTPStubs is an HTTP network mocking library and request interceptor used to simulate server responses for testing… wheresrhys/fetch-mock — Fetch-mock is a testing utility designed to isolate application code from external network dependencies by… dreamhead/moco — moco is a multi-protocol mock server and programmable API stub used to simulate HTTP, REST, WebSocket, and Server-Sent…

Alternativas open-source a Nock

Proyectos open-source similares, clasificados según cuántas características comparten con Nock.
  • nock/nockAvatar de nock

    nock/nock

    13,103Ver en GitHub↗

    nock is a Node.js HTTP mocking library and request interceptor. It captures outgoing network traffic to specific hosts and paths, returning predefined responses to decouple applications from external servers during automated testing. The project functions as an API expectation framework to verify that specific calls were made with correct parameters. It includes a traffic recorder that captures real network interactions as fixtures for playback and a network simulation tool to introduce artificial latency or trigger network errors. Its capabilities cover request matching via hostnames, paths

    JavaScripthttpjavascriptmock
    Ver en GitHub↗13,103
  • getsentry/responsesAvatar de getsentry

    getsentry/responses

    4,350Ver en GitHub↗

    Responses is a Python mocking library designed to intercept outgoing HTTP calls made with the Requests library to return predefined simulated responses. It functions as a request verification framework and a network simulation tool, allowing for the verification of application behavior against various API response patterns without making real network calls. The project distinguishes itself through a traffic recorder that captures real network interactions and saves them to files for deterministic replay. It further enables the simulation of complex network scenarios, including the triggering

    Pythontag-production
    Ver en GitHub↗4,350
  • requestly/requestlyAvatar de requestly

    requestly/requestly

    6,341Ver en GitHub↗
    TypeScriptapiapi-clientapi-mock
    Ver en GitHub↗6,341
  • alisoftware/ohhttpstubsAvatar de AliSoftware

    AliSoftware/OHHTTPStubs

    5,068Ver en GitHub↗

    OHHTTPStubs is an HTTP network mocking library and request interceptor used to simulate server responses for testing application behavior without a live backend. It functions as a network request stubbing tool that captures outgoing network calls and replaces them with predefined mock data, custom status codes, and headers. The library distinguishes itself through its ability to simulate a wide range of network conditions, including artificial latency and connection failures. It supports dynamic response sequencing, allowing the tool to return a series of different responses for the same requ

    Objective-Ciosmockmock-server
    Ver en GitHub↗5,068
Ver las 30 alternativas a Nock→