Package
esmock
provides native ESM import and globals mocking for unit tests
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
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- jsDelivr
https://cdn.jsdelivr.net/npm/esmock@2.7.6/ - unpkg
https://unpkg.com/esmock@2.7.6/ - esm.sh
https://esm.sh/esmock@2.7.6
| Package | Weekly downloads | Gzip | Last release | Module | Comparison |
|---|---|---|---|---|---|
| ng-mocks | 404.6k | - | 6 days ago | ESM + CommonJS | - |
| mocked-env | 75.4k | - | 5 years ago | CommonJS | - |
| vitest-canvas-mock | 819.6k | - | 20 days ago | ESM + CommonJS | - |
| mock-match-media | 31.2k | - | 11 months ago | ESM + CommonJS | - |
| @jedmao/redux-mock-store | 11.5k | - | 6 years ago | ESM + CommonJS | - |
| vitest-console | 10.4k | - | 11 months ago | ESM only | - |
| mock-xmlhttprequest | 94k | - | 1 year ago | ESM + CommonJS | - |
| jest-launchdarkly-mock | 76.6k | - | 6 months ago | CommonJS | - |
Indexability: Indexed.