Skip to content
JS
Package

mock-require

Simple, intuitive mocking of Node.js modules.

v3.0.3, 16 Jan 2019MITCommonJSTypes: NoneTesting
$ npm install mock-require

Key numbers

As of 25 Sept 2026
Weekly downloads
231.6k
+5% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
2
Direct, from package.json
Last release
7 years ago
v3.0.3
GitHub stars
458
23 forks
Open issues / PRs
3 / 7
Contributors
-
Commits, last 52 weeks
0

Downloads

Last week 2026-09-15 to 2026-09-21
0200k400k600kSept 2025Mar 2026Sept 2026High 449.8k (4 Aug 2026)Low 125.5k (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.

231,577 downloads last week, 1,156,085 in the last month. The 12-month change of +5% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
-
Latest version
3.0.3, 16 Jan 20197 years ago
First published
-
Last push to GitHub
15 Mar 20212,019 days before the snapshot
Repository archived
Yes
Open issues
3
Open pull requests
7
Commits, last 52 weeks
0
Dependents on npm
153

Major versions

-

Recent releases

-

Module format
CommonJSFrom package.json type, main and exports fields
TypeScript types
None
Node.js engine range
>=4.3.0
Runtimes
-
Unpacked size (npm)
47 kB
Dependencies (2)
normalize-pathget-caller-file
npm install mock-require
  • jsDelivrhttps://cdn.jsdelivr.net/npm/mock-require@3.0.3/
  • unpkghttps://unpkg.com/mock-require@3.0.3/
  • esm.shhttps://esm.sh/mock-require@3.0.3
PackageWeekly downloadsGzipLast releaseModuleComparison
proxyquire938.1k-7 years agoCommonJS-
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.