3f598221 Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng)‘npm unlink’ would implicitly unlink the current dir until version 7, which requires an argument
51417a38 Fix bundling of cjs module (#2412) (Julian Grinblat)
Fix bundling of cjs module
Run prettier
Released by Carl-Erik Kopseng on 2021-11-04.
b20ef9e4 Upgrade to fake-timers@8 (Carl-Erik Kopseng). This is potentially breaking, but should not be, as the breaking change deals with the Node timer object created by fake timers.eba42cc3 Enable esm named exports (#2382) (Julian Grinblat)b0cf5448 Spelling (#2398) (Josh Soref)e78a6706 Make calledWith() assertions idempotent (#2407) (Joel Bradshaw)2814c0a2 Generate CHANGES.md using @studio/changes (Morgan Roderick)This will bring us closer to having the same release process as the other
@sinonjspackages.
2d5d6ad4 Run tests in Node 16 in GitHub Actions (Morgan Roderick)Released by Carl-Erik Kopseng on 2021-11-03.
util.inspect for formatting human readable output (this retires @sinonjs/formatio)docs/changelog.md and set new release id in docs/_config.ymlThe major release is caused by removing old mistakes and upgrading dependencies that themselves have had new major releases.
sinon.spyCallsinon.sandbox.createdeprecated.printWarning stubbing from testfake.lastArg to last argument regardless of typein matcher (#1811)5## .0.10
@std/esm to esm.fakesinon as a default sandboxnew (#1626)nise and re-import it to keep api the sameusingPromise method to stub and sandbox.extend and typeOfMerge pull request #1303 from dougo/docs-fixups Docs fixups
Merge pull request #1302 from sinonjs/add-behavior addBehavior
Merge pull request #1300 from Gvozd/optimize_performance Optimize performance of call-stack getting
Merge pull request #1301 from fatso83/1299-redirect-traffic-to-releases Redirect /docs and /downloads to /releases
Merge pull request #1296 from sinonjs/remove-deal-links Remove dead links
Merge pull request #1295 from mroderick/add-bithound-config Add .bithoundrc
Merge branch ‘bouk-server-aint-xhr’
Merge pull request #1293 from mroderick/update-v1-docs-with-bundler-warnings Update 1.x documentation to say that it doesn't work with bundlers
Merge pull request #1294 from sinonjs/browserify-build Use Node instead of Ruby in the build script
Merge pull request #1292 from mroderick/update-readme Update readme
Merge pull request #1291 from mroderick/update-phantomjs Use phantomjs-prebuilt
Merge pull request #1289 from mroderick/fix-invalid-release-version-in-docs Fix invalid release number in v1.17.7.md front matter
Merge pull request #1290 from sinonjs/common-eslint Use common Sinon.JS eslint config
Merge pull request #1288 from mroderick/improve-documentation Improve documentation
Merge pull request #1283 from lucasfcosta/docs-stub-callThrough Add docs for stub.callThrough()
Merge pull request #1285 from sinonjs/uncycle-server-deps Uncycle server deps
Merge pull request #1282 from sinonjs/mochify-3 Use mocaccino 2 and mochify 3
Merge pull request #1281 from mroderick/add-missing-documentation Add missing documentation
Merge pull request #1277 from mroderick/remove-copyright-comments Remove copyright comments
Merge pull request #1271 from mroderick/use-es5-features Refactoring: use ES5.1 features
Merge pull request #1273 from melinath/patch-1 Update text-encoding version
Merge pull request #1255 from fatso83/remove-legacy-ie Remove traces of legacy IE
Merge pull request #1266 from duclet/chalk Switch to using “chalk” from “colors”
Merge pull request #1260 from JoshuaCWebDeveloper/ajax_events Fire onload event on non-2xx HTTP statuses in FakeXDomainRequest - fixes #1259
Merge pull request #1257 from piamancini/patch-1 Add backers and sponsors from Open Collective
Merge pull request #1256 from sprzybylski/download-page Create downloads page (#1218)
Merge pull request #1252 from mroderick/update-bundle-for-ruby-2.4.0 Update Gemfile for ruby 2.4.0
Merge pull request #1254 from mroderick/refute-issue-1245-in-sinon-2 Add test to disprove issue 1245 in Sinon 2.x
Merge pull request #1253 from BenBrostoff/error-equality Add error equality to deepEqual
Merge pull request #1243 from sprzybylski/changelog-page Update changelog page in postversion.sh
Merge pull request #1239 from mroderick/refactor-stub-method Refactor stub methods
Merge pull request #1242 from Floby/add-documentation-for-promise-stub Add documentation for .rejects() and .resolves()
Merge pull request #1241 from mroderick/cleanup-test-console Stop polluting the test console with a “test” string
Merge pull request #1238 from tarjei/patch-1 Document server.requests
Merge pull request #1235 from jonnyreeves/feature/internalize Internalise typeOf and extends
Merge pull request #1233 from lucasfcosta/fix-deepEqual-for-matchers Ensures different matchers won't be called against each other. Closes…
Merge pull request #1232 from lucasfcosta/sets-matchers Sets matchers
Merge pull request #1227 from zuzusik/zuzusik-always_chain_behavior_with_stub Always chain behavior with stub
Merge pull request #1215 from lucasfcosta/maps-matchers Maps matchers
Merge pull request #1226 from lucasfcosta/improve-site-readability Improve site readability
Merge pull request #1225 from lucasfcosta/resolve-reject-promise-upon-invoke Resolve/reject promise only upon invoke
stub(o, 'm', fn) with stub(o, 'm').callsFake(fn)sinon.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 codebasesandbox 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 modulenpm docs sinon work.files in package.jsonprogress, load and readystatechange in the readyStateChange function in FakeXMLHttpRequest are dispatched in a different order in comparison to a browser. Reorder the events dispatched to reflect general browser behaviour.returnValue and exception regression on spy calls (Maximilian Antoni)NaN to calledWith (Blake Israel)ref and unref properties on Node (Ben Fleis)callsArg* and yields* for stubs (TEHEK)spy.printf("%*") (Domenic Denicola)clearTimeout to not throw when called for nonexistent IDs.Support using bare functions as fake server response handlers (< 1.3.0 required URL and/or method matcher too)
Log some internal errors to sinon.log (defaults to noop). Set sinon.log to your logging utility of choice for better feedback when.
White-list fake XHRs: Allows some fake requests and some that fall through to the backend server (Tim Ruffles)
Decide Date.now support at fake-time. Makes it possible to load something that polyfills Date.now after Sinon loaded and still have Date.now on fake Dates.
Mirror properties on replaced function properties
New methods: spy.yield(), spy.yieldTo(), spy.callArg() and spy.callArgWith() can be used to invoke callbacks passed to spies (while avoiding the mock-like upfront yields() and friends). invokeCallback is available as an alias for yield for people working with strict mode. (Maximilian Antoni)
New properties: spy.firstCall, spy.secondCall, spy.thirdCall and spy.lastCall. (Maximilian Antoni)
New method: stub.returnsArg(), causes stub to return one of its arguments. (Gavin Huang)
Stubs now work for inherited methods. This was previously prohibited to avoid stubbing not-yet-implemented methods. (Felix Geisendörfer)
server.respond() can now accept the same arguments as server.respondWith() for quick-and-dirty respondWith+respond. (Gavin Huang)
Format objects with buster-format in the default bundle. Default to util.inspect on node unless buster-format is available (not a hard dependency, more like a ‘preference’).
Bug fix: Make sure XHRs can complete even if onreadystatechange handler fails
Bug fix: Mirror entire Date.prototype, including toUTCString when faking
Bug fix: Default this object to global in exposed asserts
Bug fix: sinon.test: use try/finally instead of catch and throw - preserves stack traces (Kevin Turner)
Bug fix: Fake setTimeout now returns ids greater than 0. (Domenic Denicola)
Bug fix: NPM install warning (Felix Geisendörfer)
Bug fix: Fake timers no longer swallows exceptions (Felix Geisendörfer)
Bug fix: Properly expose all needed asserts for node
Bug fix: wrapMethod on window property (i.e. when stubbing/spying on global functions)
Bug fix: Quote “yield” (Ben Hockey)
Bug fix: callOrder works correctly when spies have been called multiple times
Switched indentation from 2 to 4 spaces :)
Node.js compatibility improvements
Remove magic booleans from sinon.assert.expose, replace with option object
Put QUnit adapter in its own repository
Update build script to build standalone timers and server files
Breaking change: thisObj -> thisValue Change brings consistency to the code-base, always use thisValue
Add sinon.assert.pass callback for successful assertions
Extract sandbox configuration from sinon.test
Refactored sinon.test to not do all the heavy lifting in creating sandbox objects from sinon.config. Now sinon.sandbox.create accepts an optional configuration that can be retrieved through sinon.getConfig({ ... }) - or, to match previous behavior, through sinon.getConfig(sinon.config);
The default configuration now lives in sinon.defaultConfig rather than the previous sinon.test.
This change enables external tools, such as test framework adapters, to easily create configurable sandboxes without going through sinon.test
Rewrite sinon.clock.tick to fix bug and make implementation clearer
Test config load correct files
Make timers and XHR truly standalone by splitting the IE work-around in two files
Don't fail when comparing DOM elements in sinon.deepEqual (used in calledWith(...))
Should mirror properties on Date when faking it
Added and updated configuration for both JsLint and JavaScript lint
[August Lilleaas] The build script can optionally build a file without the version name in it, by passing ‘plain’, i.e. ‘./build plain’.
Useful when using the build script to build and use sinon programatically, so one can ‘cp path/to/sinon/pkg/sinon.js my/scripts/’
[August Lilleaas] Checking and warning if we got a load error and rubygems isn't present.
[August Lilleaas] Updating build script to be runnable from any directory. Current working directory doesn't have to be repo root.