NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2830 most downloaded on npm
JavaScript test spies, stubs and mocks.
Last release 2 months ago
20 Jul 2026
Release timing varies
gaps range from 2 weeks to 6 months
Nearly every release is documented
notes for 21 of 22 stable releases
199 versions withdrawn
withdrawn after publishing
16 years old
221 releases · first in 2010
Return returned value of invokant when using yields* and callsArg*
Add postinstall banner pointing to Open Collective
One column per quarter.
- Make @std/esm a devDependency
Fix inconsistent newline usage for %D in spy.printf
Add descriptive error message on attempt to call argument that is not a function
Docs: make it clear that it is possible to use assert with spy calls
Change return value of yield and callArg
add calledOnceWithExactly assertion
Replace formatio with @sinonjs/formatio
Fix #1638: Make resetHistory work for props
Performance: spend less time stubbing methods
* Add match.every and match.some
Fix bad build, missing nise@1.2.0
This release fixes an issue, where the server type from useFakeServer is unexpected
This release fixes an issue, where the server type from useFakeServer is unexpected (#1534)
Deprecate spy.reset(), use spy.resetHistory() instead
Spy passes through calling with new
new (#1626)Remove deprecated methods from documentation
Remove "engines" from package.json
- Add sandbox.createStubInstance
Update 'nise' to latest version
Upgrade nise and lolex versions
Explicitly update fake xhr lib 'nise'
fix 'callThrough with a mock expectation'
resolvesThis should override previous throws
Fix #1521 by caching references to Array.prototype.filter
Add factory functions for sandbox and fake server
Remove deprecated exports see migration guide
nise and re-import it to keep api the samestub#withArgs: set promiseLibrary correctly
Allow anonymous mock functions to be named
Fix 1474: propagates promiseLibrary to new stub behaviors
Fix #1476: spy.withArgs(args...).firstCall is broken
Fix #1274: spy.withArgs(args...).callCount is incorrect
Fix #1274: spy.withArgs(args...).callCount is incorrect
Check configurable on a prop before creating (fixes #1456)
Fix #1372: make sandbox.resetHistory also reset spies
Fix #1450, make stubbing of static function properties possible
Fix failing sandbox.resetBehavior()
Make calledAfter symmetric with calledBefore
Allow stubbing of accessors with and without sandbox
Added usingPromise method to stub and sandbox.
usingPromise method to stub and sandbox.[feature] adds spy.calledImmediatelyBefore and spy.calledImmediatelyAfter
This is the big 2.0 release with lots of breaking changes. We have created a migration guide on the Sinon homepage you are advised to follow.
This is the big 2.0 release with lots of breaking changes. We have created a migration guide on the Sinon homepage you are advised to follow.
Changes since pre6
Add sinon.addBehavior, use it to add the default behaviors
extend and typeOfExtract deprecated.printWarning
Changes in this release, compared to v2.0.0-pre.3
Changes in this release, compared to v2.0.0-pre.3
Add assertion check for too many args with calledOnce/Twice/Thrice
Expose sinon.assert on sandbox instances.
sinon.assert on sandbox instances. (#1076)sinon.test() and sinon.testCase (now in sinon-test module.)sinon.log and sinon.logErrorsinon.assert on sandbox instances. (#1076)sinon.test() and sinon.testCase.sinon.log and sinon.logErrorsinon-test module.get-config tests from sinon-test.function-to-string tests from sinon-test.restore tests from sinon-test.createStubInstance tests from sinon-testdeep-equal tests from sinon-test.wrap-method tests from sinon-test.extend tests from sinon-test to extend-testsinon.format from the codebaseFix #875 Proper support UTF8 payloads
sandbox into a CommonJS module.util/fake_server_with_clock into a CommonJS moduleutil/fake_server into a CommonJS module.util/fake_timers into a CommonJS module.util/fake_xml_http_request into a CommonJS module.util/fake_xdomain_request into a CommonJS module.util/event into a CommonJS module.sinon.logError into a CommonJS module.sinon.mock into a CommonJS module.createSpyCall into a CommonJS module.sinon.assert into a CommonJS module.walk from sinon's public API.sinon import from stubsinon.behavior into a CommonJS modulesinon.walk into a CommonJS module.wrapMethod as a CommonJS moduleNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fix #821 where Sinon.JS would leak a setImmediate into global scope
Bump Lolex to stop throwing an error when faking Date but not setTimeout
Capture the stack on each spy call
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →