Skip to content
Test spies, stubs and mocks for JavaScript.
JavaScript Other
Branch: master
Clone or download

Latest commit

fatso83 Merge pull request #2257 from adam-lynch/patch-1
Docs: Typo in lolex-async-promises how to
Latest commit c1e07a3 Apr 27, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Merge branch 'master' into drop-node-8 Feb 12, 2020
.github Set SINON_CHROME_BIN for esm-bundle test Jan 21, 2020
docs Docs: Typo in lolex-async-promises how to Apr 25, 2020
lib Remove needless intermediary Mar 9, 2020
scripts Merge pull request #2239 from fatso83/2152-improve-stubs-doc.md Mar 25, 2020
test Rename util Mar 9, 2020
.editorconfig Add subdir eslintrc for mjs Mar 8, 2018
.eslintignore Fix broken RunKit embeds after merging #2239 Mar 26, 2020
.eslintrc.yml Add prettier Oct 8, 2018
.gitignore Prepare documentation using site in GitHub Pages Dec 8, 2016
.markdownlintrc Add runnable example demo for Spies documentation - Demo #2040 Oct 4, 2019
.min-wd Experiment over Jun 28, 2017
.npmrc Ensure that we always use loose versioning Jul 21, 2018
.prettierrc Add prettier Oct 8, 2018
AUTHORS Update CHANGELOG.md and AUTHORS for new release Apr 8, 2020
CHANGELOG.md Update CHANGELOG.md and AUTHORS for new release Apr 8, 2020
CODE_OF_CONDUCT.md Add CODE_OF_CONDUCT.md Feb 10, 2020
COMPATIBILITY.md Create COMPATIBILITY.md (#2051) Jun 24, 2019
CONTRIBUTING.md Add CODE_OF_CONDUCT.md Feb 10, 2020
Gemfile Add Jekyll sitemap for SEO improvements Oct 13, 2018
Gemfile.lock
LICENSE Update copyright year to current Mar 21, 2017
README.md Add CODE_OF_CONDUCT.md Feb 10, 2020
RELEASE.md Rename History.md to CHANGELOG.md Dec 8, 2018
build.js Set `detectGlobals` to `false` when bundling sinon Dec 18, 2019
docker-compose.yml Simplify Circle CI setup Mar 20, 2019
eslint-local-rules.js Run prettier on all files and fix violations Oct 8, 2018
package-lock.json 9.0.2 Apr 8, 2020
package.json 9.0.2 Apr 8, 2020

README.md

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 Join the chat at https://gitter.im/sinonjs/sinon Build status Sauce Test Status Codecov status OpenCollective OpenCollective npm downloads per month CDNJS version Contributor Covenant

Sauce Test Status

Better docs?

Do you wish that Sinon had better documentation?

So do we!

With your support, we can improve the documentation for everyone.

  1. Donate to the campaign for better documentation
  2. Spread the word of the campaign in your companies and on social media

Thank you!

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

Support us with a monthly donation and help us continue our activities. [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

You can’t perform that action at this time.