awesome-repositories.com
المدونة
MCP
awesome-repositories.com

اكتشف أفضل مستودعات المصادر المفتوحة باستخدام بحث مدعوم بالذكاء الاصطناعي.

استكشفعمليات بحث منسقةبدائل مفتوحة المصدربرمجيات ذاتية الاستضافةالمدونةخريطة الموقع
المشروعحولكيفية ترتيب النتائجالصحافةخادم MCP
قانونيالخصوصيةالشروط
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
wheresrhys avatar

wheresrhys/fetch-mock

0
View on GitHub↗
1,310 نجوم·192 تفرعات·JavaScript·MIT·9 مشاهداتwww.wheresrhys.co.uk/fetch-mock↗

Fetch Mock

Fetch-mock is a testing utility designed to isolate application code from external network dependencies by intercepting and overriding outgoing traffic. It functions as a network request interceptor that captures calls made via the Fetch API, allowing developers to simulate server responses and verify application behavior without requiring a live backend infrastructure.

The library distinguishes itself through a unified interface that provides consistent network interception logic across diverse runtime environments, including browsers, service workers, and server-side platforms. By replacing the native fetch function with a proxy, it enables the definition of custom response payloads, status codes, and headers, while simultaneously maintaining a log of all intercepted requests for post-execution verification.

The tool supports a range of testing methodologies, including frontend unit testing and API integration testing. It provides a matching engine to evaluate outgoing requests against user-defined predicates and includes capabilities for asserting that specific requests were executed with the expected parameters, methods, and headers.

Features

  • API Request Mocking - Intercepts Fetch API requests to simulate server responses and verify application behavior without a live backend.
  • Network Request Interceptors - Captures and overrides HTTP traffic to ensure test suites remain fast, deterministic, and independent of live servers.
  • API Integration Testing - Validates application behavior by simulating specific HTTP server responses and error conditions during integration tests.
  • Request Verification - Asserts that applications trigger expected HTTP requests with correct parameters, methods, and headers during automated tests.
  • Frontend Unit Testing - Enables frontend unit testing by intercepting network calls to isolate components from backend dependencies.
  • Request Matching Engines - Evaluates outgoing requests against user-defined predicates to select the appropriate mock response.
  • Environment Abstraction Layers - Decouples network interception logic from specific runtime environments like browsers, Node.js, and service workers.
  • Cross-Environment Test Harnesses - Ensures consistent network interception behavior across diverse runtime environments including browsers and server-side platforms.
  • Request Interception Middleware - Processes outgoing requests through a chain of handlers to determine whether to return a mock or proceed.
  • Response Mocking - Allows configuration of custom response bodies, status codes, and headers to simulate various server outcomes.
  • Network Request Histories - Maintains a detailed log of all intercepted network requests to enable post-execution verification and assertions.
  • Cross-Environment Test Execution - Provides a consistent testing harness for network interception across browser and server-side JavaScript runtimes.
  • Global Object Interception - Intercepts network calls by replacing the global fetch function with a proxy handler.
  • JavaScript Testing Frameworks - Provides a library for isolating code from network dependencies during automated JavaScript test execution.
  • Response Simulators - Provides asynchronous promise-based responses with custom headers and bodies to simulate network behavior during tests.
  • Network Request Assertions - Validates application logic by asserting that specific network requests were made with the expected parameters and headers.
  • Network Request Interception - Prevents actual network traffic during testing by capturing fetch calls and returning predefined responses.

سجل النجوم

مخطط تاريخ النجوم لـ wheresrhys/fetch-mockمخطط تاريخ النجوم لـ wheresrhys/fetch-mock

بحث بالذكاء الاصطناعي

استكشف المزيد من المستودعات الرائعة

صف ما تحتاجه بلغة بسيطة — وسيقوم الذكاء الاصطناعي بترتيب آلاف المشاريع مفتوحة المصدر المنسقة حسب الصلة.

Start searching with AI

مجموعات مختارة تضم Fetch Mock

مجموعات منسقة بعناية يظهر فيها Fetch Mock.
  • مكتبات محاكاة طلبات HTTP

بدائل مفتوحة المصدر لـ Fetch Mock

مشاريع مفتوحة المصدر مشابهة، مرتبة حسب عدد الميزات المشتركة مع Fetch Mock.
  • getsentry/responsesالصورة الرمزية لـ getsentry

    getsentry/responses

    4,350عرض على 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
    عرض على GitHub↗4,350
  • nock/nockالصورة الرمزية لـ nock

    nock/nock

    13,103عرض على 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
    عرض على GitHub↗13,103
  • pgte/nockالصورة الرمزية لـ pgte

    pgte/nock

    13,108عرض على GitHub↗

    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 prov

    JavaScript
    عرض على GitHub↗13,108
  • square/okhttpالصورة الرمزية لـ square

    square/okhttp

    46,971عرض على GitHub↗

    OkHttp is an HTTP client for the JVM and Android that enables network communication via synchronous and asynchronous requests. It provides a core identity as a comprehensive networking toolkit featuring a WebSocket client for bidirectional data synchronization, a TLS security toolkit for encrypted communication, and a programmable HTTP mock server for simulating backend responses. The project distinguishes itself through a specialized security and performance architecture. It implements mutual TLS, certificate pinning, and DNS over HTTPS to secure data in transit, while utilizing connection p

    Kotlinandroidgraalvmjava
    عرض على GitHub↗46,971
عرض جميع البدائل الـ 30 لـ Fetch Mock→

الأسئلة الشائعة

ما هي وظيفة wheresrhys/fetch-mock؟

Fetch-mock is a testing utility designed to isolate application code from external network dependencies by intercepting and overriding outgoing traffic. It functions as a network request interceptor that captures calls made via the Fetch API, allowing developers to simulate server responses and verify application behavior without requiring a live backend infrastructure.

ما هي الميزات الرئيسية لـ wheresrhys/fetch-mock؟

الميزات الرئيسية لـ wheresrhys/fetch-mock هي: API Request Mocking, Network Request Interceptors, API Integration Testing, Request Verification, Frontend Unit Testing, Request Matching Engines, Environment Abstraction Layers, Cross-Environment Test Harnesses.

ما هي البدائل مفتوحة المصدر لـ wheresrhys/fetch-mock؟

تشمل البدائل مفتوحة المصدر لـ wheresrhys/fetch-mock: getsentry/responses — Responses is a Python mocking library designed to intercept outgoing HTTP calls made with the Requests library to… nock/nock — nock is a Node.js HTTP mocking library and request interceptor. It captures outgoing network traffic to specific hosts… pgte/nock — Nock is a Node.js HTTP mocking library used to intercept outgoing network requests and return predefined responses. It… square/okhttp — OkHttp is an HTTP client for the JVM and Android that enables network communication via synchronous and asynchronous… ctimmerm/axios-mock-adapter — This library provides a utility for intercepting and simulating HTTP requests within the Axios ecosystem. It functions… bblimke/webmock — WebMock is a Ruby library for HTTP request stubbing, response simulation, and network interception. It serves as a…