# ctimmerm/axios-mock-adapter

Axios adapter that allows to easily mock requests

Repository: https://github.com/ctimmerm/axios-mock-adapter
Canonical: https://ross.abutalabs.com/products/axios-mock-adapter
Language: JavaScript
License: MIT
License Family: permissive
Topics: axios, mocking, javascript, mock
Last push: 2026-02-07T08:38:21+00:00

## Health v2 (maintenance only)
Score: 52/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 66, release rhythm 8, longevity 100
- inputs: {"age_days": 3817, "days_push": 207, "days_rel": 693, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3545, forks 251 (observed 2026-08-28T04:08:09.403056+00:00)

## What it is
An axios adapter that intercepts and mocks HTTP requests made with the axios client. It lets developers define canned responses, delays, network errors, and timeouts for testing without hitting real endpoints.

## Use cases
- mock axios requests in unit tests
- simulate API responses for frontend development
- test network error and timeout handling
- stub HTTP endpoints with specific query params
- add artificial latency to mocked responses

## When to choose
- you use axios and need request mocking in Jest/Mocha tests
- you want to simulate failures like network errors or timeouts
- you need a lightweight dev-time mock without running a server

## When to avoid
- you don't use axios as your HTTP client
- you need full contract testing or a standalone mock server
- you need to mock fetch or other non-axios requests

## Facets
- artifact type: library
- maturity: stable
- function: mocking, testing, http-client
- domain: testing, web-development, developer-tools
- platform: browser, cross-platform
- tags: axios, http-mocking, unit-testing, stubbing, javascript, nodejs

## Member repositories
- ctimmerm/axios-mock-adapter (main) score 52

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:09.403056+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:34:25.052624+00:00, confidence not recorded.
  - readme: https://github.com/ctimmerm/axios-mock-adapter (fetched 2026-08-28T04:08:09.403056+00:00, sha 036d06193c58)
  - registry_npm: https://registry.npmjs.org/axios-mock-adapter (fetched 2026-08-29T09:28:47.395169+00:00, sha 658a5ef98a2d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
