A Mocking Framework

JSON →
library 4.0.8 ·javascript
verified May 27, 2026

The `a` package provides a versatile mocking framework for JavaScript and TypeScript, designed to be used with any testing framework. It is currently stable at version 4.0.8, with recent updates including the addition of comprehensive TypeScript types in v4.0.7, indicating an active development cadence. Key differentiators include its ability to create both partial mocks (which fall back to the original function) and strict mocks (which throw on unexpected calls), alongside detailed argument expectation, advanced matching for arrays and objects, and control over repeat behaviors. This allows for precise control over test doubles, supporting TDD and BDD methodologies in unit testing scenarios. The framework provides flexible options for stubbing and verification of function calls.

total hits 60
actors 11 distinct systems
last hit 1d ago human
MetaBot
4
GPTBot
2
Script
1
Amazonbot
1
ByteDance
1
ClaudeBot
1
PerplexityBot
1
Search engines
10
Humans
31

top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇩🇪 Germany · VN · 🇨🇦 Canada