sinonjs/sinon
Test spies, stubs and mocks for JavaScript. observed · 2026-08-28
Health v2 · maintenance only
66/100
- Activity 96
- Release rhythm 8
- Longevity 100
Flags: no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 5909
- days_rel: n/a
- days_push: 28
- n_releases_24m: 0
Adoption not part of the score
9758 stars · 803 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Sinon.JS is a standalone, test framework agnostic JavaScript library providing test spies, stubs, mocks, and fake timers. It integrates seamlessly with any unit testing framework such as Mocha, Jest, Jasmine, or tap.
Use cases
- spy on function calls in JavaScript unit tests
- stub dependencies in unit tests
- mock API methods for testing
- fake timers to test time-dependent code
- create test doubles without a specific test framework
- replace module functions during tests
When to choose
- you need spies, stubs, or mocks in JavaScript tests
- you want a test framework agnostic mocking library
- you need fake timers for testing async or scheduled code
- you want minimal integration with your existing test runner
When to avoid
- you need module-level mocking of ES module imports (consider proxyquire or testdouble.js)
- your test framework already provides built-in mocking you prefer
- you are testing non-JavaScript languages
Facets
library · maturity stable
testing mocking testing developer-tools browser cross-platform test-spies stubs mocks fake-timers tdd unit-testing test-framework-agnostic javascript nodejs
4 sources
- readme: https://github.com/sinonjs/sinon · fetched 2026-08-28 · 54f5390196dd
- homepage: https://sinonjs.org/ · fetched 2026-08-29 · bb6687c21280
- site_page: https://sinonjs.org/getting-started · fetched 2026-08-29 · 5fab335ecf98
- site_page: https://sinonjs.org/guides/faq · fetched 2026-08-29 · 83b6fe121a24
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| sinonjs/sinon | main | 66 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem