Sinon

Test spies, stubs and mocks for JavaScript.
Alternatives To Sinon
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Mockery10,379112,37918,2626 days ago36September 07, 2022117otherPHP
Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL).
Sinon9,281
a day ago43otherJavaScript
Test spies, stubs and mocks for JavaScript.
Ohhttpstubs4,767
1,2382 years ago60December 02, 202043otherObjective-C
Stub your network requests easily! Test your apps with fake network data and custom response time, response code and headers!
Nsubstitute1,897
2 months ago100otherC#
A friendly substitute for .NET mocking libraries.
Gock1,795120407a month ago21August 03, 202138mitGo
HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽
Mockit1,565
4 months ago58mitJavaScript
A tool to quickly mock out end points, setup delays and more...
Cuckoo1,558
393 days ago48March 18, 202269mitSwift
Boilerplate-free mocking framework for Swift!
Fakeiteasy1,388
7 days ago26mitC#
The easy mocking library for .NET
Mocha1,14031,3044,3693 months ago80June 25, 202190otherRuby
Mocha is a mocking and stubbing library for Ruby
Ocmockito987
6933 months ago22February 20, 202112mitObjective-C
Mockito for Objective-C: creation, verification and stubbing of mock objects
Alternatives To Sinon
Select To Compare


Alternative Project Comparisons
Readme

Sinon.JS
Sinon.JS

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

npm version Sauce Test Status Codecov status OpenCollective OpenCollective npm downloads per month CDNJS version Contributor Covenant

Compatibility

For details on compatibility and browser support, please see COMPATIBILITY.md

Installation

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.

Usage

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 sinon tag on Stack Overflow or drop by #sinon.js on irc.freenode.net:6667.

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

Goals

  • 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

Contribute?

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

Backers

Thank you to all our backers! [Become a backer]

Sponsors

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

Licence

Sinon.js was released under BSD-3

Popular Mock Projects
Popular Stub Projects
Popular Software Quality Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Javascript
Mock
Test Driven Development
Stub
Unit Testing
Sinon