Sinon.JS
Test spies, stubs and mocks library for JavaScript unit and integration testing.
Testing npm BSD-3-Clause
Used in agent projects
28
0.2% of 12,697 public repos built with AI coding agents
Rank in testing
#29 of 40
by use in those projects
Downloads
10.7M
npm, last 7 days, sinon
GitHub stars
9,753
last push Oct 8, 2026
How Sinon.JS is used
Sinon.JS is a dependency in 28 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (0.2%), #29 of 40 in testing. The most used alternative there is Vitest. Projects that use it most often also use Chai (64.3%), Mocha (60.7%), ts-node (39.3%).
Often used with Sinon.JS
| Chai | 64.3% of Sinon.JS projects · 26.8× more than average |
|---|---|
| Mocha | 60.7% of Sinon.JS projects · 27.4× more than average |
| ts-node | 39.3% of Sinon.JS projects · 5.8× more than average |
| Jest | 32.1% of Sinon.JS projects · 5.8× more than average |
| rimraf | 28.6% of Sinon.JS projects · 15.8× more than average |
| uuid | 25.0% of Sinon.JS projects · 7.0× more than average |
| TypeScript | 75.0% of Sinon.JS projects |
| ESLint | 60.7% of Sinon.JS projects · 1.6× more than average |
By coding agent
| Claude Code | 0.3% of projects set up for it |
|---|---|
| GitHub Copilot | 0.3% of projects set up for it |
| Cursor | 0.3% of projects set up for it |
Share of public repos configured for each agent that list Sinon.JS as a dependency.
Install
| Package | npm install sinon |
|---|---|
| Main stacks | TypeScript / JavaScript (26), Next.js (2) |
| Example projects | zeta-chain/toolkit, richardsondx/checkmate, badlogic/vs-claude, confluentinc/vscode, hayesmaker/phase-2-e |
Alternatives to Sinon.JS
| Tool | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|
| Vitest npm Next-generation testing framework powered by Vite with native ESM. |
1,549 (12.2%) | 123M | 17.2K | MIT |
| Playwright (JavaScript) npm Cross-browser automation library for end-to-end testing. |
1,117 (8.8%) | 74.2M | 97.4K | Apache-2.0 |
| Testing Library npm Testing utilities for React encouraging testing user behavior. |
915 (7.2%) | 68.7M | 19.7K | MIT |
| Jest npm Delightful JavaScript testing framework with minimal configuration. |
702 (5.5%) | 46.3M | 45.6K | MIT |
| jsdom npm JavaScript implementation of web standards for testing DOM interactions. |
681 (5.4%) | 112M | 21.7K | MIT |
| pytest pypi Simple, powerful Python testing framework with fixtures and plugins. |
330 (2.6%) | 196M | 14.6K | — |
| Chai npm BDD/TDD assertion library for Node.js and browsers with expressive syntax. |
305 (2.4%) | 14M | 8,265 | MIT |
| Mocha npm Feature-rich JavaScript test framework for Node.js and browsers. |
281 (2.2%) | 12.6M | 22.9K | MIT |