Need help with sinon?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

8.7K Stars 784 Forks Other 3.4K Commits 45 Opened issues


Test spies, stubs and mocks for JavaScript.

Services available


Need anything else?

Contributors list


Standalone and test framework agnostic JavaScript test spies, stubs and mocks (pronounced "sigh-non", named after Sinon, the warrior).

npm version Join the chat at Build status Sauce Test Status Codecov status OpenCollective OpenCollective npm downloads per month CDNJS version Contributor Covenant

Sauce Test Status


For details on compatibility and browser support, please see


via npm

$ npm install sinon

or via sinon's browser builds available for download on the homepage. There are also npm based CDNs one can use.


See the sinon project homepage for documentation on usage.

If you have questions that are not covered by the documentation, you can check out the

tag on Stack Overflow or drop by #sinon.js on

You can also search through the Sinon.JS mailing list archives.


  • No global pollution
  • Easy to use
  • Require minimal “integration”
  • Easy to embed seamlessly with any testing framework
  • Easily fake any interface
  • Ship with ready-to-use fakes for XMLHttpRequest, timers and more


See for details on how you can contribute to Sinon.JS


Support us with a monthly donation and help us continue our activities. [Become a backer]


Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]


Sinon.js was released under BSD-3

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.