Install
@vitest/mocker
Vitest module mocker implementation
5.1.2Latest, 25 Nov 2026
796MDownloads, last month
0Advisories on the latest
3Advisories, all versions
MITLicence
17KStars
Source · Homepage · Ask AI Mode · · Markdown
Known advisories
| Severity | Advisory | Fix | Published |
|---|---|---|---|
| Moderate | Vitest: Code injection via unauthenticated manual mock registration CVE-2026-112949 | Fixed in 4.1.12, 5.0.3 | 21 Oct 2026 |
| Moderate | Vitest: Windows backslash traversal bypasses the @vitest/mocker redirect allowlist fix CVE-2026-112950 | Fixed in 4.1.12, 5.0.3 | 21 Oct 2026 |
| Moderate | Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock CVE-2026-84373 | Fixed in 4.1.11, 5.0.0-rc.2 | 8 Sep 2026 |
In the news
- Record, mock-replay and CI-gate your agent's tool path dev.to, 3 Dec 2026
- I ran my Stripe webhook sync against real Stripe. The mocks hid one thing. dev.to, 3 Dec 2026
- Mocking an API you don't own: patching fetch/XHR in the page, then exporting the mock to Playwright and MSW dev.to, 3 Dec 2026
- Wike Mocks Opposition Coalition, Says Atiku, Obi Won’t Agree To Drop Presidential Ambitions arise.tv, 1 Dec 2026
- How to Test a LangGraph Agent Without an API Key: A Deterministic Mock LLM for Routing, RAG, Tools and Human-in-the-Loop dev.to, 1 Dec 2026
On Hacker News
- Mocker: A crappy imitation of Docker, written in 100% Python 55 points, 11 comments, 10 Jan 2018
Sources: npm, deps.dev (CC BY 4.0), OSV. Last checked 4 Dec 2026.