Această bibliotecă oferă un utilitar pentru interceptarea și simularea cererilor HTTP în ecosistemul Axios. Funcționează ca un interceptor de cereri HTTP care permite dezvoltatorilor să definească răspunsuri mock pentru traficul de rețea de ieșire, permițând testarea integrării frontend și dezvoltarea fără a necesita infrastructură backend live.
Principalele funcționalități ale ctimmerm/axios-mock-adapter sunt: HTTP Mocking, Frontend API Mocking, HTTP Request Interceptors, Network Request Interception, Request Matching Engines, Request Verification, Stateful Request Tracking, JavaScript Testing Frameworks.
Alternativele open-source pentru ctimmerm/axios-mock-adapter includ: wheresrhys/fetch-mock — Fetch-mock is a testing utility designed to isolate application code from external network dependencies by… mswjs/msw — MSW is a JavaScript API mocking library and integration testing tool designed to intercept network requests at the… netflix/pollyjs — Pollyjs is an HTTP mocking and recording library designed to capture and replay network interactions to create… nock/nock — nock is a Node.js HTTP mocking library and request interceptor. It captures outgoing network traffic to specific hosts… requestly/requestly. getsentry/responses — Responses is a Python mocking library designed to intercept outgoing HTTP calls made with the Requests library to…
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
MSW is a JavaScript API mocking library and integration testing tool designed to intercept network requests at the network level. It allows for the definition of mock data and status codes using routing syntax to simulate server responses without requiring changes to the application source code. The project utilizes a service worker to proxy API calls in the browser, providing a mechanism for isolated frontend development and testing. It employs platform-specific network adapters to maintain a consistent mocking interface across both browser and Node.js environments. The library covers a ran
Pollyjs is an HTTP mocking and recording library designed to capture and replay network interactions to create deterministic tests. It functions as a request interceptor and stubbing framework that records real API responses into files, ensuring consistent test results across different environments without relying on live network servers. The tool utilizes pluggable network adapters to support various environments and employs a state-based mode switching system to toggle between recording, replaying, and stubbing behaviors. It uses pattern-based request matching and persistent interaction sto
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