Skip to content
JS
Package

mock-xmlhttprequest

XMLHttpRequest mock for testing

v8.4.1, 18 Jan 2025MITESM + CommonJSTypes: BundledTestingDev servers and API mocking
$ npm install mock-xmlhttprequest

Key numbers

As of 25 Sept 2026
Weekly downloads
94k
-31% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
0
Direct, from package.json
Last release
1 year ago
v8.4.1
GitHub stars
32
8 forks
Open issues / PRs
1 / 1
Contributors
-
Commits, last 52 weeks
0

Downloads

Last week 2026-09-15 to 2026-09-21
0100k200k300kSept 2025Mar 2026Sept 2026High 232.7k (24 Mar 2026)Low 69.3k (23 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

94,004 downloads last week, 505,798 in the last month. The 12-month change of -31% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
-
Latest version
8.4.1, 18 Jan 20251 year ago
First published
-
Last push to GitHub
23 Mar 2025550 days before the snapshot
Repository archived
No
Open issues
1
Open pull requests
1
Commits, last 52 weeks
0
Dependents on npm
14

Major versions

-

Recent releases

-

Module format
ESM + CommonJSFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
>=16.0.0
Runtimes
-
Unpacked size (npm)
210 kB
Dependencies (0)
None
npm install mock-xmlhttprequest
  • jsDelivrhttps://cdn.jsdelivr.net/npm/mock-xmlhttprequest@8.4.1/
  • unpkghttps://unpkg.com/mock-xmlhttprequest@8.4.1/
  • esm.shhttps://esm.sh/mock-xmlhttprequest@8.4.1
PackageWeekly downloadsGzipLast releaseModuleComparison
xhr-mocklet332.8k-7 years agoESM + CommonJS-
@mswjs/interceptors15.6m-todayESM only-
mocked-env75.4k-5 years agoCommonJS-
vitest-canvas-mock819.6k-20 days agoESM + CommonJS-
@msw/playwright144.1k-5 months agoESM only-
sinon-express-mock18.8k-7 years agoCommonJS-
mock-match-media31.2k-11 months agoESM + CommonJS-
@jedmao/redux-mock-store11.5k-6 years agoESM + CommonJS-
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.