sinonjs/sinon

Test spies, stubs and mocks for JavaScript.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 7 minutes ago
Added to GitGenius on September 6th, 2026
Created on June 29th, 2010
Open Issues & Pull Requests: 62 (+0)
GitHub issues: Enabled
Number of forks: 805
Total Stargazers: 9,757 (+0)
Total Subscribers: 95 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 21.3 hours
Mean response time: 46.2 days
90th percentile: 100.3 days
Tracked items: 53

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 8% of issues opened in the past year have been closed. Three people close 86% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 19
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 645 days
Stale 30+ days: 17
Stale 90+ days: 14

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • Bug (19)
  • Unverified (16)
  • Help wanted (6)
  • Documentation (4)
  • good first issue (4)
  • pinned (4)
  • wontfix (3)
  • Difficulty: Easy (2)

Most active issues this week

Detailed Description

Sinon is a test spy, stub, and mock library for JavaScript that works standalone and independently of any testing framework.

The library solves the problem of isolating units under test by providing tools to replace parts of your system with controlled test doubles. Spies record information about function calls without changing behavior, stubs replace functions with controlled implementations, and mocks assert that functions are called in specific ways. The tool is designed to integrate seamlessly with any testing framework without polluting the global namespace, and it ships with ready-to-use fakes for timers to handle time-dependent code.

Sinon suits any JavaScript project that needs to verify behavior through test doubles rather than just checking return values. It works well for unit testing where you need to isolate code under test from its dependencies, and for testing code that depends on timers or other system interfaces. The library's framework-agnostic design means it works alongside whatever test runner and assertion library you already use, whether that is Mocha, Jest, Jasmine, or others.

The project maintains artifact-first contract tests to protect its public APIs during development, ensuring backward compatibility as the codebase evolves. The generated build output in the lib directory is not committed to the repository, requiring developers to run the build step locally to regenerate it when needed.