Skip to content
JS
Package

esmock

provides native ESM import and globals mocking for unit tests

v2.7.6, 28 May 2026ISCESM onlyTypes: BundledTestingDev servers and API mocking
$ npm install esmock

Key numbers

As of 25 Sept 2026
Weekly downloads
65k
+81% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
0
Direct, from package.json
Last release
3 months ago
v2.7.6
GitHub stars
217
22 forks
Open issues / PRs
4 / 0
Contributors
-
Commits, last 52 weeks
54

Downloads

Last week 2026-09-15 to 2026-09-21
025k50k75k100kSept 2025Mar 2026Sept 2026High 96.5k (25 Aug 2026)Low 23.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.

65,014 downloads last week, 314,474 in the last month. The 12-month change of +81% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
-
Latest version
2.7.6, 28 May 20263 months ago
First published
-
Last push to GitHub
29 May 2026118 days before the snapshot
Repository archived
No
Open issues
4
Open pull requests
0
Commits, last 52 weeks
54
Dependents on npm
6

Major versions

-

Recent releases

-

Module format
ESM onlyFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
>=14.16.0
Runtimes
-
Unpacked size (npm)
26 kB
Dependencies (0)
None
npm install esmock
  • jsDelivrhttps://cdn.jsdelivr.net/npm/esmock@2.7.6/
  • unpkghttps://unpkg.com/esmock@2.7.6/
  • esm.shhttps://esm.sh/esmock@2.7.6
PackageWeekly downloadsGzipLast releaseModuleComparison
ng-mocks404.6k-6 days agoESM + CommonJS-
mocked-env75.4k-5 years agoCommonJS-
vitest-canvas-mock819.6k-20 days agoESM + CommonJS-
mock-match-media31.2k-11 months agoESM + CommonJS-
@jedmao/redux-mock-store11.5k-6 years agoESM + CommonJS-
vitest-console10.4k-11 months agoESM only-
mock-xmlhttprequest94k-1 year agoESM + CommonJS-
jest-launchdarkly-mock76.6k-6 months agoCommonJS-
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.