Sinon.JS
Metrics as of , from the GitHub or GitLab API of each repository. Refreshed monthly.
What Sinon.JS is
Sinon.JS is a JavaScript library of test spies, stubs and mocks. It works standalone and does not depend on any particular test framework. Its stated goals include no global pollution, minimal integration, faking any interface and shipping fakes for timers. The package installs from npm, and browser builds are available from the project homepage. Usage documentation lives on the sinonjs.org site.
Written from the project's README, read , and its documentation (see sources).
- Category
- Test data and mocking
- License
- BSD-3-Clause
- Language
- JavaScript
- Changelog
- Releases on GitHub
Repository metrics
Status
activeLast commit within 90 days of the fetch date.Computed from the last commit date and the archive flag on the fetch date. See the status rules.
Alternatives
Listed test data and mocking tools, same primary language first, then by GitHub stars. Each line gives one fact from the tool's documentation where it differs from Sinon.JS's, with its source.
JSON Server: Definition format: JSON or JSON5 data file (db.json or db.json5). source: README
Nock: Languages for writing tests: Node.js. source: README
mountebank: Languages for writing tests: REST API; community client libraries for C#, Clojure, Go, Java, JavaScript, PHP, Python, Ruby and others. source: Docs: Client Libraries
Faker: Languages for writing tests: Python (3.8 and above). source: README
Mock Service Worker: Definition format: Code (request handlers passed to setupServer in Node.js or setupWorker in the browser). source: Docs: Quick start
@faker-js/faker: Languages for writing tests: JavaScript (browser and Node.js). source: Docs: Getting Started
Mockito: Languages for writing tests: Java. source: README
Bogus: Languages for writing tests: C#, F#, VB.NET. source: README
How to install
npm install sinonQuestions
Is Sinon.JS open source?
Yes. Sinon.JS is released under BSD-3-Clause, an OSI-approved license, as reported by the GitHub API on 2026-09-22.
Is Sinon.JS maintained?
On 2026-09-22, the last commit to the default branch was on 2026-07-20, so the listed status is active. Rule: Last commit within 90 days of the fetch date.
How many GitHub stars does Sinon.JS have?
9,759 stars on 2026-09-22, from the GitHub API. The number is refreshed at each monthly update.
What language is Sinon.JS written in?
The repository's primary language, as reported by the GitHub API, is JavaScript.
How do I install Sinon.JS?
The README gives this command: npm install sinon
Sources
- GitHub REST API: repository, read
- GitHub REST API: commits, read
- GitHub REST API: latest release, read
- GitHub REST API: contributors, read
- LICENSE file, read
- README, read