UNPKG

56.9 kBMarkdownView Raw
1# Changes
2
3## 12.0.1
4
5- [`3f598221`](https://github.com/sinonjs/sinon/commit/3f598221045904681f2b3b3ba1df617ed5e230e3)
6 Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng)
7 >
8 > 'npm unlink' would implicitly unlink the current dir
9 > until version 7, which requires an argument
10 >
11- [`51417a38`](https://github.com/sinonjs/sinon/commit/51417a38111eeeb7cd14338bfb762cc2df487e1b)
12 Fix bundling of cjs module (#2412) (Julian Grinblat)
13 >
14 > * Fix bundling of cjs module >
15 > * Run prettier
16
17_Released by [Carl-Erik Kopseng](https://github.com/fatso83) on 2021-11-04._
18
19## 12.0.0
20
21- [`b20ef9e4`](https://github.com/sinonjs/sinon/commit/b20ef9e4940e9384a6d0707b917a38e7bbfcd816)
22 Upgrade to fake-timers@8 (Carl-Erik Kopseng). This is potentially breaking, but should not be,
23 as the breaking change deals with the Node timer object created by fake timers.
24- [`eba42cc3`](https://github.com/sinonjs/sinon/commit/eba42cc38dbaf5417178a12cec11e35014e335ea)
25 Enable esm named exports (#2382) (Julian Grinblat)
26- [`b0cf5448`](https://github.com/sinonjs/sinon/commit/b0cf5448993c2ace607cdf430b7e389d02c2f296)
27 Spelling (#2398) (Josh Soref)
28- [`e78a6706`](https://github.com/sinonjs/sinon/commit/e78a670611682c7e35cf7d27887b409d6397d27c)
29 Make calledWith() assertions idempotent (#2407) (Joel Bradshaw)
30- [`2814c0a2`](https://github.com/sinonjs/sinon/commit/2814c0a212ab6b79c7251e4b0a1bebc9918257d4)
31 Generate CHANGES.md using @studio/changes (Morgan Roderick)
32 > This will bring us closer to having the same release process as the
33 > other `@sinonjs` packages.
34- [`2d5d6ad4`](https://github.com/sinonjs/sinon/commit/2d5d6ad4cd89c2063834991da5073f7640d0d722)
35 Run tests in Node 16 in GitHub Actions (Morgan Roderick)
36
37_Released by [Carl-Erik Kopseng](https://github.com/fatso83) on 2021-11-03._
38
39## 11.1.2
40
41- Upgrade @sinonjs/fake-timers to latest, see https://github.com/sinonjs/fake-timers/blob/master/CHANGELOG.md#712--2021-05-28
42- Copy over accessor properties to target object #2387
43
44## 11.1.1
45
46- Fix #2379 by using v7 of supports-color
47
48## 11.1.0
49
50- Add sinon.promise() implementation (#2369)
51- Set wrappedMethod on getters/setters (#2378)
52- [Docs] Update fake-server usage & descriptions (#2365)
53- Fake docs improvement (#2360)
54- Update nise to 5.1.0 (fixed #2318)
55
56## 11.0.0
57
58- Explicitly use samsam 6.0.2 with fix for #2345
59- Update most packages (#2371)
60- Update compatibility docs (#2366)
61- Update packages (includes breaking fake-timers change, see #2352)
62- Warn of potential memory leaks (#2357)
63- Fix clock test errors
64
65## 10.0.1
66
67- Upgrade sinon components (bumps y18n to 4.0.1)
68- Bump y18n from 4.0.0 to 4.0.1
69
70## 10.0.0
71
72- Upgrade nise to 4.1.0
73- Use @sinonjs/eslint-config@4 => Adopts ES2017 => Drops support for IE 11, Legacy Edge and legacy Safari
74
75## 9.2.4
76
77- Upgrade @sinonjs/samsam@5.3.1
78
79## 9.2.3
80
81- Use `util.inspect` for formatting human readable output
82 (this retires @sinonjs/formatio)
83
84## 9.2.2
85
86- Fix #2316: handle absent Promise (#2317)
87
88## 9.2.1
89
90- Fix #2203: skip writing 'name' property if not writable (#2304)
91- Update error message on assert when representation of expected and actual value is equal, fixing issue #2084 (#2303)
92- Make sandboxes each use their own assert object (#2302)
93- Add usingPromise() method on fakes to fix issue #2293 (#2301)
94
95## 9.2.0
96
97- Update dependencies (#2299)
98- Update sandbox docs with missing comma
99- Add minor markdown formatting to release docs for sandbox
100- Minor formatting improvements to legacy sandbox documentation
101
102## 9.1.0
103
104- Add a calledOnceWithMatch assertion (#2294)
105
106## 9.0.3
107
108- Upgrade nise to latest
109- Upgrade @sinonjs/samsam to latest
110
111## 9.0.2
112
113- Bump @sinonjs/fake-timers (fix error when using Node's util/promisify with setTimeout)
114- Upgrade @sinonjs/commons (fix error when trying to calculate function name from generators)
115
116## 9.0.1
117
118- Fix #2226: restore props defined on prototype chain by deleting
119
120## 9.0.0
121
122- Ignore errors on thisValue property accesses (#2216)
123- Add firstArg to spy calls and fakes. (#2150)
124- Drop Node 8 support
125
126## 8.1.1
127
128- Fundraiser for better docs: https://www.gofundme.com/f/sinon-docs
129
130## 8.1.0
131
132- Support negative indices in getCall (#2199)
133
134## 8.0.4
135
136- Remove misleading 'own' from exception message
137
138## 8.0.3
139
140- Move .printf to proxy
141
142## 8.0.2
143
144- Upgrade @sinonjs/samsam to latest
145- Upgrade nise to 3.0.1
146
147## 8.0.1
148
149- Force upgrade @sinonjs/commons (#2181)
150- Update `docs/changelog.md` and set new release id in `docs/_config.yml`
151- Add release documentation for v8.0.0
152
153## 8.0.0
154
155The major release is caused by removing old mistakes and upgrading dependencies that themselves have had new major releases.
156
157- Upgrade nise, @sinonjs/formatio, @sinonjs/samsam and @sinonjs/referee
158- Update lolex and nise to get new async timer methods (see https://github.com/sinonjs/lolex/blob/master/CHANGELOG.md)
159- Remove `sinon.spyCall`
160- Remove `sinon.sandbox.create`
161- Remove obsolete `deprecated.printWarning` stubbing from test
162
163## 7.5.0
164
165- Add sinon.assert.calledOnceWithExactly
166- Feature parity: support _spying_ all methods on an object
167
168## 7.4.2
169
170- Restore sinon.createStubInstance() behaviour (#2073)
171- Fix Typo in migration 6 and updated migration docs for migration from… (#2074)
172
173## 7.4.1
174
175- Update nise and lolex (minor versions)
176- add callThroughWithNew method
177- add browser field
178- Create COMPATIBILITY.md (#2051)
179- Fix sinon.resetHistory() does not reset history (#2022)
180
181## 7.4.0
182
183- Was unpublished (see #2071)
184
185## 7.3.2
186
187- Update Lolex to bring in fix for sinonjs/lolex#232 (queueMicrotask warning)
188
189## 7.3.1
190
191- Fix security issues
192- Update @sinonjs/samsam to v3.3.1
193
194## 7.3.0
195
196- Simplify Circle CI setup
197- Add a Docker Compose config file for testing the setup locally
198- Inject createStubInstance and fake functionality
199- Remove unused prop 'injectIntoThis'
200- Fix #1974 by upgrading to @sinonjs/samsam@3.3.0
201
202## 7.2.7
203
204- Retain spy function names and fix spy.named(name) (#1987)
205- Document spying on accessors (#1976)
206
207## 7.2.6
208
209- Upgrade @sinonjs/formatio
210- Set `fake.lastArg` to last argument regardless of type
211
212## 7.2.5
213
214- don't call extends.nonEnum in spy.resetHistory (#1984)
215
216## 7.2.4
217
218- minor package updates
219- Update eslint-plugin-mocha
220- Fix high prio audit warnings
221- Update nise to use @sinonjs/text-encoding
222- Make all properties non-enumerable in spies, stubs, mocks and fakes
223- docs(sandbox): add example for default sandbox
224
225## 7.2.3
226
227- Update @sinonjs/nise
228- Fix stubbing function objects (#1968)
229
230## 7.2.2
231
232- Fix mock.withArgs using matchers (#1961)
233
234## 7.2.1
235
236- #1957: check for truthiness before checking whether optional override is a stub
237- Upgrade @sinonjs/samsam
238- Upgrade @sinonjs/referee to v3
239
240## 7.2.0
241
242- Upgrade to samsam 3 (#1955)
243- Rename History.md to CHANGELOG.md
244
245## 7.1.1
246
247- Make the spy functions non enumerable so that printing it is more concise (#1936)
248
249## 7.1.0
250
251- Issue #1852: Add a way to pass a global context to lolex when calling useFakeTimers
252- Get latest 'nise' patch
253
254## 7.0.0
255
256- Update to Lolex 3: no negative ticks allowed
257
258## 6.3.5
259
260- Upgrade lolex
261- Upgrade @sinonjs/samsam - fixes minor issue with IE11 introduced in 6.3.4
262
263## 6.3.4
264
265- Update samsam, puppeteer and rollup
266- Fix #1850 (keep context in fakes)
267
268## 6.3.3
269
270- Upgrade formatio, samsam, nise and referee
271
272## 6.3.2
273
274- Adds guard for empty properties in deepEqual when a matcher is provided (#1901)
275
276## 6.3.1
277
278- Fix use of non-cached reference to forEach
279
280## 6.3.0
281
282- Allow providing stubs overrides for sinon.createStubInstance (#1864)
283- Bump Lolex to 2.7.4 to include IE fixes for performance.mark
284
285## 6.2.0
286
287- Add mock.usingPromise to set the Promise library for mock expectations
288
289## 6.1.6
290
291- Upgrade Lolex, Nise and other dependencies
292
293## 6.1.5
294
295- Fix #1796, failing to stub Array.prototype.sort
296
297## 6.1.4
298
299- Update lolex and nise dependencies to latest versions
300
301## 6.1.3
302
303- Fix issue with matchers and cyclic references (#1709)
304
305## 6.1.2
306
307- Made callsArg, returnsArg, and throwsArg more strict (#1848)
308
309## 6.1.1
310
311- Restore useFakeXMLHttpRequest correctly in default sandbox (#1840)
312
313## 6.1.0
314
315- Syntax sugar for resolvesArg (#1846)
316
317## 6.0.1
318
319- Add fake behaviors to sandbox (#1815)
320
321## 6.0.0
322
323- Export Sinon and its functions as an EcmaScript module (#1809 and #1835)
324- Document/test call ordering checks
325
326## 5.1.1
327
328- Remove ES2015 'module' field for 5x branch (fix in separate branch - see tag)
329
330## 5.1.0
331
332- Add `in` matcher (#1811)
333
3345## .0.10
335
336- Remove functions shadowing time related sandbox methods (#1802)
337
338## 5.0.9
339
340- Upgrade `@std/esm` to `esm`.
341
342## 5.0.8
343
344- Add isSealed check to is-es-module to make certain ESM mocks possible
345
346## 5.0.7
347
348- Fix stub id prefix (#1786)
349
350## 5.0.6
351
352- Remove support-sinon.js as postinstall banner
353
354## 5.0.5
355
356- Refuse to replace already replaced values (#1779)
357
358## 5.0.4
359
360- Fix #1781: Reject non-function values a f argument to fake
361
362## 5.0.3
363
364- Fix #1775: Default sandbox does not restore stubs, spies, mocks
365
366## 5.0.2
367
368- Reset history on sandbox reset (#1770)
369
370## 5.0.1
371
372- Remove deprecated spy.reset method
373- Add sinon.replace, sinon.replaceGetter and sinon.replaceSetter
374- Add `fake`
375- Use `sinon` as a default sandbox
376
377## 4.5.0
378
379- Add .lastArg and .callback to spy call
380
381## 4.4.9
382
383- Fix #1746: Remove dependency on ES2015 code from post-install script
384
385## 4.4.8
386
387- Fix 1743: Add scripts/support-sinon.js to package
388
389## 4.4.7
390
391- Improve the post-install script: remove noise, add :heart:
392
393## 4.4.6
394
395- Return returned value of invokant when using yields* and callsArg* (#1724)
396
397## 4.4.5
398
399- Add postinstall banner pointing to Open Collective
400
401## 4.4.4
402
403- Make @std/esm a devDependency
404
405## 4.4.3
406
407- Fix inconsistent newline usage for %D in spy.printf (#1717)
408
409## 4.4.2
410
411- Add descriptive error message on attempt to call argument that is not a function (#1695)
412
413## 4.4.1
414
415- Docs: make it clear that it is possible to use assert with spy calls (#1688)
416
417## 4.4.0
418
419- Change return value of yield and callArg
420
421## 4.3.0
422
423- add calledOnceWithExactly assertion (#1247)
424
425## 4.2.3
426
427- Replace formatio with @sinonjs/formatio
428
429## 4.2.2
430
431- Fix #1638: Make resetHistory work for props
432
433## 4.2.1
434
435- Performance: spend less time stubbing methods (#1627)
436
437## 4.2.0
438
439- Add match.every and match.some (#1624) (#1661)
440
441## 4.1.6
442
443- Fix bad build, missing nise@1.2.0 (#1656)
444- Upgrade dependency supports-color
445
446## 4.1.5
447
448- Use nise.fakeServer as the sandbox serverPrototype (#1534)
449
450## 4.1.4
451
452- Fix: assertion error messages did not handle Symbol names (#1640)
453- Deprecate spy.reset(), use spy.resetHistory() instead (#1446)
454
455## 4.1.3
456
457- Spy passes through calling with `new` (#1626)
458
459## 4.1.2
460
461- Update Lolex to include fix for #872
462- Remove deprecated methods from documentation (#1613)
463
464## 4.1.1
465
466- Remove "engines" from package.json
467
468## 4.1.0
469
470- Add sandbox.createStubInstance (#1598)
471
472## 4.0.2
473
474- Update 'nise' to latest version (#1593)
475- Use supports-color module to test if system supports colors
476- Upgrade mocha to v4.0.0
477- Make samsam a development dependency
478- Make native-promise-only a development dependency
479
480## 4.0.1
481
482- Upgrade nise and lolex versions (#1579)
483
484## 4.0.0
485
486- Explicitly update fake xhr lib 'nise'
487- Remove accidental dependency to "build"
488- Remove support for stubbing undefined props (#1557)
489
490## 3.3.0
491
492- Adds sinon.match.hasNested
493- fix 'callThrough with a mock expectation' (#1442)
494- Documentation updates
495- Allow custom defined instance checks if supported
496
497## 3.2.1
498
499- resolvesThis should override previous throws
500- preserve context of functions from nise: fakeServer, fakeServerWithClock
501- Fix regression for issue #1526 regarding onFirstCall().throws()
502- Fix docs regression introduced by #1523
503
504## 3.2.0
505
506- Fix #1521 by caching references to Array.prototype.filter (#1523)
507- Fix #1368 by adding stub#resolvesThis (#1517)
508
509## 3.1.0
510
511- Lots of documentation updates
512- Fix regression on sandbox.stub(obj,protoMethod)
513- Add factory functions for sandbox and fake server
514- Add support for passing a function to stub.throws(...). (#1511)
515
516## 3.0.0
517
518- Remove deprecated exports (see migration guide)
519- Fix #1432: add details around expectations.withArgs behavior to docs (#1501)
520- Fix #1487: incorrect withArgs().returnValue
521- add format.setFormatter
522- Upgrade lolex to 2.1.2
523- Extract fakeXhr, fakeServer and fakeServerWithClock into own module `nise` and re-import it to keep api the same
524
525## 2.4.1
526
527- stub#withArgs: set promiseLibrary correctly (#1497)
528
529## 2.4.0
530
531- Allow anonymous mock functions to be named
532
533## 2.3.8
534
535- Fix 1474: propagates promiseLibrary to new stub behaviors (#1484)
536
537## 2.3.7
538
539- Fix #1476: spy.withArgs(args...).firstCall is broken
540
541## 2.3.6
542
543- Fix #1274: spy.withArgs(args...).callCount is incorrect
544
545## 2.3.5
546
547- Check configurable on a prop before creating (fixes #1456) (#1462)
548
549## 2.3.4
550
551- Fix #1372: make sandbox.resetHistory also reset spies (#1424)
552
553## 2.3.3
554
555- Fix #1445: make stubbing of static function properties possible
556
557## 2.3.2
558
559- Fix failing sandbox.resetBehavior() (#1428)
560- Fix restoring getters/setters/values for previously unexisting props (#1419)
561- Called in order takes callCount into account. Closes #1398.
562
563## 2.3.1
564
565- Make calledAfter symmetric with calledBefore (#1407)
566
567## 2.3.0
568
569- Allow stubbing of accessors with and without sandbox (#1416)
570- add throwsArg(index) to stubs (#1319)
571- Fix: forEach() requires 'this' argument (#1356)
572- Only reset history when calling resetHistory()
573
574## 2.2.0
575
576- Added `usingPromise` method to stub and sandbox.
577- Added support for React Native window location format Fixes sinonjs/sinon#1362
578- Fix error on call.toString() where stack has fewer than 4 lines.
579
580## 2.1.0
581
582- Redesign the template (#1339)
583- [feature] adds spy.calledImmediatelyBefore and spy.calledImmediatelyAfter
584- Fix issue #1332: little bug correction in spy.printf "%\*" formatter.
585
586## 2.0.0
587
588- Add restore method for stubbed property descriptors
589- Allow stubbing getters and setters for function properties
590- Add getters/setters stub behaviors
591- Refactor xhr and xhr.upload to use the same EventTargetHandler
592- Remove SSL part of base url
593
594## v2.0.0-pre.6
595
596- Add sinon.addBehavior, use it to add the default behaviors
597- Use Node instead of Ruby in the build script
598- Lots of documentation updates
599- Many dependency updates
600- Add a simple implementation og ANSI colors and boot out chalk
601- No circular dependencies, thank you very much
602- Replace homegrowns with ES5
603- Remove legacy IE bits from code
604- Fire onload event on non-2xx HTTP statuses in FakeXDomainRequest
605- Extract throwOnFalsyObject to own function
606- Stop polluting the test console with a "test" string
607- Complete internalization of `extend` and `typeOf`
608- Allow calling original function from stub. Closes #989 (#1234)
609- Matcher for Set type
610- Matcher for Map type
611- Fix set iterableToString test on IE11
612- add test-dev npm script to run tests in watch mode
613
614## v2.0.0-pre.5
615
616- 2.0.0-pre.5
617- Update Changelog.txt and AUTHORS for new release
618- Update changelog for pre.4
619- Remove polyfill for Promise
620- Remove old, unused, ci script for BusterJS
621- Abort pre-commit script when no files are changed
622- Check for required arguments
623- Make SED in-place update switch work on BSD
624- Upgrade text-encoding to the latest version
625- Improve rendering of sandbox.create(config) example
626- Remove sinon.test from sandbox documentation
627- Use baseurl to render links correctly on github pages
628- Specify same version of github-pages as github
629- Remove release_id from front matter
630- Update Gemfile.lock to use latest supported Jekyll
631- Fix #614: Add missing documentation for sandbox methods
632- Add missing documentation for stubs
633- Fix #1026: stub watch method on object
634- Fix invalid test for "does not walk the same property twice"
635- Add test for issue #1026
636- Fix 810 - Added documentation for sinon.restore()
637- Add docs for new array matchers
638- Array contains matcher fails when actual is not an array
639- Array endsWith matcher fails when actual is not an array
640- Array startsWith matcher fails when actual is not an array
641- Array deepEquals matcher fails when actual is not an array
642- Add .resolves and .rejects to stub (#1211)
643- Accept routing DSLs on fake server
644- Convert remaining calledWith methods to use diff color formatting
645- Color diffs for sinon matchers
646- Print diffs for multiple spy calls
647- Add new spy output formatter for handling diffs
648- Add contains array matcher
649- Add endsWith array matcher
650- Add startsWith array matcher
651- Add deepEquals array matcher
652- Add more array matchers
653- Extract deprecated.printWarning
654- Move empty stub creation to avoid unnecessary stub.create
655- Fix typo on property name called 'matchingAguments'
656- Soften migration path with deprecation warning
657- Update docs and migration guide
658- Convert 3 arg stub to callsFake
659- Update format docs to refer to formatio
660- Fix being able to spy Error
661- Prepare documentation using site in GitHub Pages
662- Add link to LICENSE in README.md
663- Add documentation for accessor method support for stubs and spies
664- Previous expectation failures are checked and re-thrown again in mock.verify()
665- Expose XHR.setStatus to simplify asynchronous answers
666- Fix typo
667- Add a how-to article about using links seams for CommonJS modules
668- stub() will fail if passed an empty property descriptor
669- Rename func argument to funcOrDescriptor
670- Add documentation for sinon.assert.match
671- XHR: test for readystatechange not dispatching after .abort() in DONE state
672- XHR: fix readystatechange event after .abort() in DONE state
673- Add tests for xhr.readyState after abort()
674- Test that demonstrates that a mock can be called more times than expected without failing (if the exception is silenced).
675
676## v2.0.0-pre.6
677
678- Merge pull request #1303 from dougo/docs-fixups
679 Docs fixups
680- Merge pull request #1302 from sinonjs/add-behavior
681 addBehavior
682- Merge pull request #1300 from Gvozd/optimize_performance
683 Optimize performance of call-stack getting
684- Merge pull request #1301 from fatso83/1299-redirect-traffic-to-releases
685 Redirect /docs and /downloads to /releases
686- Merge pull request #1296 from sinonjs/remove-deal-links
687 Remove dead links
688- Merge pull request #1295 from mroderick/add-bithound-config
689 Add .bithoundrc
690- Merge branch 'bouk-server-aint-xhr'
691
692- Merge pull request #1293 from mroderick/update-v1-docs-with-bundler-warnings
693 Update 1.x documentation to say that it doesn't work with
694 bundlers
695- Merge pull request #1294 from sinonjs/browserify-build
696 Use Node instead of Ruby in the build script
697- Merge pull request #1292 from mroderick/update-readme
698 Update readme
699- Merge pull request #1291 from mroderick/update-phantomjs
700 Use phantomjs-prebuilt
701- Merge pull request #1289 from mroderick/fix-invalid-release-version-in-docs
702 Fix invalid release number in v1.17.7.md front matter
703- Merge pull request #1290 from sinonjs/common-eslint
704 Use common Sinon.JS eslint config
705- Merge pull request #1288 from mroderick/improve-documentation
706 Improve documentation
707- Merge pull request #1283 from lucasfcosta/docs-stub-callThrough
708 Add docs for stub.callThrough()
709- Merge pull request #1285 from sinonjs/uncycle-server-deps
710 Uncycle server deps
711- Merge pull request #1282 from sinonjs/mochify-3
712 Use mocaccino 2 and mochify 3
713- Merge pull request #1281 from mroderick/add-missing-documentation
714 Add missing documentation
715- Merge pull request #1277 from mroderick/remove-copyright-comments
716 Remove copyright comments
717- Merge pull request #1271 from mroderick/use-es5-features
718 Refactoring: use ES5.1 features
719- Merge pull request #1273 from melinath/patch-1
720 Update text-encoding version
721- Merge pull request #1255 from fatso83/remove-legacy-ie
722 Remove traces of legacy IE
723- Merge pull request #1266 from duclet/chalk
724 Switch to using "chalk" from "colors"
725- Merge pull request #1260 from JoshuaCWebDeveloper/ajax_events
726 Fire onload event on non-2xx HTTP statuses in
727 FakeXDomainRequest - fixes #1259
728- Merge pull request #1257 from piamancini/patch-1
729 Add backers and sponsors from Open Collective
730- Merge pull request #1256 from sprzybylski/download-page
731 Create downloads page (#1218)
732- Merge pull request #1252 from mroderick/update-bundle-for-ruby-2.4.0
733 Update Gemfile for ruby 2.4.0
734- Merge pull request #1254 from mroderick/refute-issue-1245-in-sinon-2
735 Add test to disprove issue 1245 in Sinon 2.x
736- Merge pull request #1253 from BenBrostoff/error-equality
737 Add error equality to deepEqual
738- Merge pull request #1243 from sprzybylski/changelog-page
739 Update changelog page in postversion.sh
740- Merge pull request #1239 from mroderick/refactor-stub-method
741 Refactor stub methods
742- Merge pull request #1242 from Floby/add-documentation-for-promise-stub
743 Add documentation for .rejects() and .resolves()
744- Merge pull request #1241 from mroderick/cleanup-test-console
745 Stop polluting the test console with a "test" string
746- Merge pull request #1238 from tarjei/patch-1
747 Document server.requests
748- Merge pull request #1235 from jonnyreeves/feature/internalize
749 Internalise `typeOf` and `extends`
750- Merge pull request #1233 from lucasfcosta/fix-deepEqual-for-matchers
751 Ensures different matchers won't be called against each
752 other. Closes…
753- Merge pull request #1232 from lucasfcosta/sets-matchers
754 Sets matchers
755- Merge pull request #1227 from zuzusik/zuzusik-always_chain_behavior_with_stub
756 Always chain behavior with stub
757- Merge pull request #1215 from lucasfcosta/maps-matchers
758 Maps matchers
759- Merge pull request #1226 from lucasfcosta/improve-site-readability
760 Improve site readability
761- Merge pull request #1225 from lucasfcosta/resolve-reject-promise-upon-invoke
762 Resolve/reject promise only upon invoke
763
764## v2.0.0-pre.5
765
766- Merge pull request #1223 from fatso83/release-script-improvements
767 Minor fixes to the release scripts
768- Merge pull request #1222 from Gothdo/patch-1
769 Upgrade text-encoding to the latest version
770- Merge pull request #1216 from mroderick/improve-documentation
771 Improve documentation for stubs and sandboxes
772- Merge pull request #1217 from mroderick/make-docs-run-on-github-pages
773 Update Gemfile.lock to use latest supported Jekyll
774- Merge pull request #1213 from tiemevanveen/docs-restore
775 Added documentation for sinon.restore()
776- Merge pull request #1214 from mroderick/fix-1026-in-2.x
777 Fix 1026 in 2.x
778- Merge pull request #1210 from lucasfcosta/document-new-array-matchers
779 Add docs for new array matchers
780- Merge pull request #1203 from jdgreenberger/add-expectation-diff-logs
781 Add expectation diff logs
782- Merge pull request #1208 from lucasfcosta/array-matchers
783 Array matchers
784- Merge pull request #1209 from lucasfcosta/avoid-unnecessary-empty-stub-creation
785 Avoid unnecessary empty stub creation
786- Merge pull request #1207 from hurrymaplelad/calls-fake
787 Replace `stub(o, 'm', fn)` with `stub(o, 'm').callsFake(fn)`
788- Merge pull request #1162 from dottedmag/master
789 XHR spec conformance: abort() should not dispatch
790 readystatechange event in DONE state
791- Merge pull request #1184 from mroderick/fail-on-empty-property-descriptor
792 Fail on empty property descriptor
793- Merge pull request #1206 from fatso83/sinon-format-docs
794 Update format docs to refer to formatio
795- Merge pull request #1204 from estobbart/master
796 Fix being able to spy Error
797- Merge pull request #1189 from mroderick/docs-in-github-pages
798 Prepare documentation using site in GitHub Pages
799- Merge pull request #1180 from mroderick/add-documentation-for-assert.match
800 Add documentation for sinon.assert.match
801- Merge pull request #1182 from mroderick/document-accessor-support
802 Add documentation for accessor method support for stubs and
803 spies
804- Merge pull request #1191 from LostArchives/master
805 Add link to LICENSE in README.md
806- Merge pull request #1188 from DanReyLop/verify-silenced-exceptions
807 Mock expectation errors are now re-thrown when calling
808 mock.verify()
809- Merge pull request #1186 from mroderick/add-how-to-link-seam-commonjs
810 Add a how-to article about using links seams for CommonJS
811 modules
812- Merge pull request #1178 from dottedmag/feature-xhr-set-status
813 Expose XHR.setStatus to simplify asynchronous answers
814
815## 2.0.0-pre.5
816
817- Upgrade text-encoding to the latest version
818- Remove sinon.test from sandbox documentation
819- Fix #1026: stub watch method on object
820- Add .resolves and .rejects to stub (#1211)
821- Accept routing DSLs on fake server
822- Color diffs for sinon matchers
823- Add new spy output formatter for handling diffs
824- Add various array matchers
825- Convert 3 arg stub to callsFake
826- Fix being able to spy Error
827- Prepare documentation using site in GitHub Pages
828- Various documentation additions and fixes
829- Previous expectation failures are checked and re-thrown again in mock.verify()
830- Expose XHR.setStatus to simplify asynchronous answers
831- XHR: test for readystatechange not dispatching after .abort() in DONE state
832- XHR: fix readystatechange event after .abort() in DONE state
833
834## 2.0.0-pre.4
835
836- Use last matching withArgs declaration when using matchers (#1183)
837- Implement XHR.overrideMimeType
838- Fire .onprogress event handler in fake XHR
839- Expose readyState constants on XHR instances
840- add configurable unsafe header checks (#1061)
841
842## 2.0.0-pre.3
843
844- Add assertion check for too many args with calledOnce/Twice/Thrice
845- Much internal refactoring relating to CommonJS
846
847## 2.0.0-pre.2
848
849- CJSify sinon.call tests (#1079)
850- CJSify sinon.calledInOrder tests (#1080)
851- CJSify get-config tests (#1081)
852- CJSify sinon.assert tests (#1078)
853- Resolve test failure in node 0.10.x (#1073)
854- Expose `sinon.assert` on sandbox instances. (#1076)
855- Add resetBehavior and resetHistory to sandbox API (#1072)
856- Fix incorrect inline function names
857- Fix calledOnce on tests for #283. This closes #283.
858- Add sandbox.reset() docs
859- Add a line recommending how to pronounce.
860- Improve tests based on PR feedback
861- Allow xhr.respond(0) to simulate a network failure and call onerror
862- Use event loaded instead of error event for code like 403, 500, etc.
863- Fix invalid markdown in fake-timers.ms (#1054)
864- Do not invoke getters in walk (#1059)
865- ReactNative compatibility. Allow sinon fakeServer to run in React Native (#1052)
866- added timeouts to ensure tests pass
867- Run tests on stable Node 6 instead of unstable Node 5
868- added tests to ensure only expected events are fired (#1043)
869- Fixed formatting of issue template
870- Added note on using latest version
871- Fix onerror event triggering for fake xhr requests (#1041)
872- Add missing mocaccino and phantomic to package.json (#1029)
873- Pull request and issue templates (#1012)
874- Fix capturing of stack traces in Phantom.js.
875- Allow sinon.calledInOrder to be called either with an array of spies or multiple spies as parameters. Add explicit test cases for sinon.calledInOrder
876- Fix typos found by codespell
877- Document faking of setImmediate and clearImmediate
878- Add feature detection guard for tests containing es6 Symbols
879- Add support for es6 Symbol to wrapMethod method
880- Convert values to strings with toString instead of String()
881- Add typeOf matcher for symbol type
882- Make expectation fail as expected when called with wrong Symbol
883- Make mock report expected TypeError when expecting number and given symbol
884- Add support for es6 Symbol to match.has method
885- Make error message when failing to stub method support es6 symbol
886- Make yieldToOn fail as expected when yielding an es6 Symbol
887- Add support for es6 Symbol to match.same method
888- Make yieldTo fail as expected when yielding an es6 Symbol
889- Add support for es6 Symbol to match method
890- Work around SauceLabs security limitations
891- Declare test specific eslint configs in test/.eslintrc
892- Add test-coverage script
893- Add eslint-plugin-mocha
894- Remove browserify-shim
895- Setup saucelabs tests and adjust travis config
896- Feature detect **proto** to exclude a timer test in IE 10
897- Convert webworker test to mocha
898- Remove buster
899- Replace npm test script with mocha / mochify invocations
900- Fix async fake-xml-http-request tests
901- Convert issues tests to mocha
902- Convert util tests to mocha
903- Convert core tests to mocha
904- Convert stub tests to mocha
905- Convert typeof tests to mocha
906- Convert spy tests to mocha
907- Convert sandbox tests to mocha
908- Convert mock tests to mocha
909- Convert hello world test to mocha
910- Convert extend tests to mocha
911- Convert collection tests to mocha
912- Convert call tests to mocha
913- Convert assert tests to mocha
914- Convert matcher tests to mocha
915- Update docs/TODO.md to reflect plan to Jekyll
916- CJSify Spy and Stub Tests.
917- CJSify Core Util Tests.
918- Migrate Packaged Tests to use a Browserified Build.
919- fix non enumerable methods stub restore
920- Improve Blob support detection logics
921- Fix a typo in Contributing.md
922- Update Node versions on Travis
923- Use PhantomJS 2.
924- Fix #835: make err.message writable
925- Remove linting errors in switch cases
926- Add spy.notCalled to documentation
927- Remove `sinon.test()` and `sinon.testCase`.
928- Remove `sinon.log` and `sinon.logError`
929- De-fluff
930- Remove `sinon-test` module.
931- Extract `get-config` tests from `sinon-test`.
932- Extract `function-to-string` tests from `sinon-test`.
933- Extract `restore` tests from `sinon-test`.
934- Extract `createStubInstance` tests from `sinon-test`
935- Extract `deep-equal` tests from `sinon-test`.
936- Extract `wrap-method` tests from `sinon-test`.
937- Extract `extend` tests from `sinon-test` to `extend-test`
938- Move 'lib/util/core' tests into 'test/util/core'
939- Remove the use of `sinon.format` from the codebase
940- Require sinon.deepEqual in a more modular way
941- Fix 648: test for this.proxy before trying toString on it
942- use the correct sinon.deepEqual to test sinon matcher
943- add stub test to ensure sinon matcher is recognized within stub.withArgs
944- update repo link
945- Remove unused dependency util
946- Update samsam
947- Update lolex
948- Update browserify
949- Update dependency pre-commit
950- Update buster-istanbul to 0.1.15
951- ignore webstorm configs
952- fix async issues and increase buster timeout
953- test on node 5
954- Fixes typo error in docs
955- fix typo in lib/sinon.js
956- Fixes typo error in docs
957- Adding comment to warn against using eval
958- fix linting
959- Get rid of eval in sinon spy
960- Update README URLs based on HTTP redirects
961
962## 2.0.0-pre
963
964- 2.0.0 pre-release
965- Extract `sandbox` into a CommonJS module.
966- Clarify documentation on creating stubs and spies
967- Extract `util/fake_server_with_clock` into a CommonJS module
968- Extract `util/fake_server` into a CommonJS module.
969- Extract `util/fake_timers` into a CommonJS module.
970- Extract `util/fake_xml_http_request` into a CommonJS module.
971- Extract `util/fake_xdomain_request` into a CommonJS module.
972- Extract `util/event` into a CommonJS module.
973- Extract `sinon.logError` into a CommonJS module.
974- Extract (most of) sinon.collection into a CommonJS module
975- Extract `sinon.mock` into a CommonJS module.
976- Import mock's dependencies are CommonJS modules.
977- Extract `createSpyCall` into a CommonJS module.
978- Extract `sinon.assert` into a CommonJS module.
979- Remove `walk` from sinon's public API.
980- Patch up linting errors
981- Remove `sinon` import from stub
982- Extract `sinon.behavior` into a CommonJS module
983- Extract `sinon.walk` into a CommonJS module.
984- Export stub as a CommonJS module
985- Import `wrapMethod` as a CommonJS module
986- Import core dependencies as CommonJS modules
987- Delete .jscsrc
988- Ensure sinon can run in a WebWorker
989- Updated docs to reflect that calledOn accepts a matcher
990- simplified test and added a note
991- updated to require spy in its new cjs form
992- ./commonjs
993- expose sinon.spy and sinon.spyCall
994- converted spy to commonjs format
995- moved sinon.format() to core
996- fixed spy tests
997- added missing test (pushes spy coverage to 100%)
998- added spy getter/setter tests
999- updated sinon.spy() to properly handle getters and setters
1000- Remove unnecessary error variable
1001- Prevent stubbed getter from being called during restore() - fixes #897
1002- Allowed GET requests to have request bodies
1003- Remove JSCS from devDependencies
1004- Add Gitter badge
1005- Allow yieldsOn, callsArgOn, callsArgOnWith, yieldsToOn to use any context
1006- Add bithound badge to README.md
1007- removed switch statement in favor of object lookup
1008- Use immediate exceptions
1009- lib/sinon/util: Remove window conditionals from IE files.
1010- Add docs for sandbox and utils
1011- Add documentation for matchers
1012- Add docs for assertions
1013- Add docs for JSON-P
1014- Add docs for fake server
1015- Add docs for fake timers
1016- Add mock api descriptions
1017- Add mocks introduction
1018- Add stubs api
1019- Update TODO
1020- Use Object.prototype.hasOwnProperty in deepEqual to cope with cases where hasOwnProperty doesn't exist, ie. Object.create(null), or has been overridden on an object. With tests.
1021- Add docs TODO to track outstanding tasks
1022- Add stubs.md with introduction to stubs
1023- Import docs
1024- Fix #875 Proper support UTF8 payloads _ introduced new dependency "text-encoding" _ delegate encoding operations to TextEncoder/TextDecoder \* added unit test to verify proper utf-8 encoding
1025- finished eslint'ing
1026- upgraded ESLint to 1.7.1 (latest and greatest)
1027- Run tests in node 4.2 LTS (Argon)
1028- removed unneeded path resolution
1029- Let npm install handle buster again, now that we have caching of node_modules
1030- Make travis cache node_modules to speed up builds
1031- removed duplicate implementation of sinon.timesInWords
1032- fix travis-ci build svg in README
1033- reviewer comments
1034- cleaning up left over blank lines
1035- CommonJS-ified _some_ of the things
1036- updated readyStateChange to align to the w3c spec (somewhat)
1037- cleaned up a few unrelated tests
1038- updated tests to reflect reality
1039- added some additional progress event verification
1040- added a test to ensure load is not fired before abort
1041- added test to ensure event ordering
1042- allow progress events with loaded/total values of 0
1043- Fix #867: Walk properties only once
1044- Removed unnecessary module wrappers and double test run in NodeJS.
1045- null-check the object passed to sinon.stub
1046- implemented stub#resetHistory method - fixes #863
1047- Fix #851: Do not attempt to re-stub constructors
1048- Fix #847: Ensure walk invokes accessors directly on target
1049- Run tests in node 4.1.x also
1050- stub.reset also resets behavior
1051
1052## 1.17.0
1053
1054- Fix #821 where Sinon.JS would leak a setImmediate into global scope
1055- Removed sinon-timers from the build. refs #811
1056- Added flag that, when set to true, makes sinon.logError throw errors synchronously.
1057- Fix #777: Support non-enumerable props when stubbing objects
1058- Made the sinon.test() function pass on errors to the callback
1059- Expand conversion from ArrayBuffer to binary string
1060- Add support for ArrayBuffer, blob responseTypes
1061
1062## 1.16.1
1063
1064- Bump Lolex to stop throwing an error when faking Date but not setTimeout
1065
1066## 1.16.0
1067
1068- Capture the stack on each spy call
1069- fakeServer.create accepts configuration settings
1070- Update Lolex to 1.3.0
1071- Fire onreadystatechange with event argument
1072- Returns supersedes previous throws
1073- Bunch of bug fixes
1074
1075## 1.15.0
1076
1077- Fixed bug where assertions don't handle functions that have a property named proxy
1078- update license attribute
1079- Add test coverage report
1080- responseHeaders on abort are empty object
1081- Fix pre-existing style error
1082- Update documentation to cover testing built version
1083- Update CONTRIBUTING.md with section about "Making a pull request"
1084- Improve RELEASE.md to reduce effort when cutting a new release
1085- Deprecate mock
1086- Release.md
1087- Make `npm docs sinon` work.
1088- Run unit tests against packaged version in CI environment
1089- Remove unused Gruntfile
1090- Use Vanilla Buster.JS
1091- Use `files` in package.json
1092- Fix code style
1093- Don't stub getter properties
1094- Event listeners for `progress`, `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.
1095- Update linting instructions in CONTRIBUTING.md
1096- Lint all files with new linter
1097- Update JSCS to 1.11.3 and make npm lint task verify all files
1098- Cleanup .restore()
1099
1100## 1.14.1
1101
1102- Fallback for .restore() native code functions on Chrome & PhantomJS (なつき)
1103- Restore support for sinon in IE<9 (Harry Wolff)
1104
1105## 1.14.0
1106
1107- Stub & spy getters & setters (Simon Zack)
1108- Fix #702 async sinon.test using mocha interface (Mohayonao)
1109- Add respondImmediately to fake servers (Jonathan Freeman)
1110
1111## 1.13.0
1112
1113- fix @depends-require mismatches (fixes AMD issues) (Ben Hockey)
1114- Fix spy.calledWith(undefined) to return false if it was called without args
1115- yieldsRight (Alexander Schmidt)
1116- stubs retain function arity (Charlie Rudolph)
1117- (AMD) use explicit define in built version
1118- spy().reset() returns this (Ali Shakiba)
1119- Add lengthComputable and download progress (Tamas Szebeni)
1120- Don't setContent-type when sending FormData (AJ Ortega)
1121- sinon.assert with spyCall (Alex Urbano)
1122- fakeXHR requests in Node. (Jmeas)
1123- Enhancement: run builds on docker (till@php.net)
1124- Use FakeXDomainRequest when XHR does not support CORS. Fixes #584 (Eric Wendelin)
1125- More lenient check for ActiveXObject
1126- aligned sandbox.useFakeXMLHttpRequest API to documentation (Phred)
1127- Fix #643. Returns supersedes previous throws (Adam Hull)
1128- Safely overwrite properties in IE - no more IE files!
1129- Add check for setInterval/clearInterval (kdpecker)
1130- Add safety check for document.createElement (kdpecker)
1131- Fix #633. Use a try/catch when deleting a property in IE8. (Garrick Cheung)
1132
1133## 1.12.1
1134
1135- Fixed lolex issue on node
1136
1137## 1.12.0
1138
1139- Fake timers are now extracted as lolex: http://github.com/sinonjs/lolex
1140- Improved setImmediate fake
1141- Proper AMD solution
1142
1143## 1.11.1
1144
1145- Expose match on returned sandbox (Duncan Beevers)
1146- Fix issue #586 (Antonio D'Ettole)
1147- Declare log_error dependency (Kurt Ruppel)
1148
1149## 1.11.0
1150
1151- Proper AMD support
1152- Don't call sinon.expectation.pass if there aren't any expectations (Jeffrey Falgout)
1153- Throw error when reset-ing while calling fake
1154- Added xhr.response property (Gyandeep Singh)
1155- Fixed premature sandbox destruction (Andrew Gurinovich)
1156- Add sandbox reset method (vitalets)
1157- A bunch of bug fixes (git log)
1158- Various source organizational improvements (Morgan Roderick and others)
1159
1160## 1.10.3
1161
1162- Fix loading in Web Workers (Victor Costan)
1163- Allow null as argument to clearTimeout and clearInterval (Lars Thorup)
1164
1165## 1.10.2
1166
1167- Fix `returnValue` and `exception` regression on spy calls (Maximilian Antoni)
1168
1169## 1.10.1
1170
1171- Improved mocha compatibility for async tests (Ming Liu)
1172- Make the fakeServer log function overloadable (Brian M Hunt)
1173
1174## 1.10.0
1175
1176- Ensure that spy createCallProperties is set before function invocation (James Barwell)
1177- XDomainRequest support (Søren Enemærke, Jonathan Sokolowski)
1178- Correct AMD behavior (Tim Branyen)
1179- Allow explicit naming of spies and stubs (Glen Mailer)
1180- deepEqual test for unequal objects in calledWithExactly (Bryan Donovan)
1181- Fix clearTimeout() for Node.js (Xiao Ma)
1182- fix fakeServer.respond() in IE8 (John Bernardo)
1183- Fix #448 (AMD require.amd)
1184- Fix wrapMethod error handling (Nikita Litvin)
1185
1186## 1.9.1
1187
1188- Fix an issue passing `NaN` to `calledWith` (Blake Israel)
1189- Explicate dependency on util package (Kris Kowal)
1190- Fake timers return an object with `ref` and `unref` properties on Node (Ben Fleis)
1191
1192## 1.9.0
1193
1194- Add sinon.assert.match (Robin Pedersen)
1195- Added ProgressEvent and CustomEvent. Fixes bug with progress events on IE. (Geries Handal)
1196- prevent setRequestHeaders from being called twice (Phred)
1197- Fix onload call, 'this' should be equal to XHR object (Niklas Andreasson)
1198- Remove sandbox injected values on restore (Marcus Hüsgen)
1199- Coerce matcher.or/and arguments into matchers (Glen Mailer)
1200- Don't use buster.format any more
1201- Fix comparison for regexp deepEqual (Matt Kern)
1202
1203## 1.8.2
1204
1205- Fixes an edge case with calledWithNew and spied native functions, and other
1206 functions that lack a .prototype
1207- Add feature detection for the new ProgressEvent support
1208
1209## 1.8.1
1210
1211- Screwed up NPM release of 1.8.0, unable to replace it
1212
1213## 1.8.0
1214
1215- Add clearImmediate mocking support to the timers API (Tim Perry)
1216- Mirror custom Date properties when faking time
1217- Improved Weinre support
1218- Update call properties even if exceptions are thrown (Tim Perry)
1219- Update call properties even if exceptions are thrown (Tim Perry)
1220- Reverse matching order for fake server (Gordon L. Hempton)
1221- Fix restoring globals on another frame fails on Firefox (Burak Yiğit Kaya)
1222- Handle stubbing falsy properties (Tim Perry)
1223- Set returnValues correctly when the spied function is called as a constructor (Tim Perry)
1224- When creating a sandbox, do not overwrite existing properties when inject
1225 properties into an object (Sergio Cinos)
1226- Added withCredentials property to fake xhr (Geries)
1227- Refine behavior withArgs error message (Tim Fischbach)
1228- Auto-respond to successive requests made with a single XHR object (Jan Suchý)
1229- Add the ability for mock to accept sinon.match matchers as expected arguments (Zcicala)
1230- Adding support for XMLHttpRequest.upload to FakeXMLHttpRequest (Benjamin Coe)
1231- Allow onCall to be combined with returns\* and throwsException in stub behavior
1232 sequences (Tim Fischbach)
1233- Fixed deepEqual to detect properties on array objects
1234- Fixed problem with chained timers with delay=0 (Ian Lewis)
1235- Use formatio in place of buster-format (Devin Weaver)
1236
1237## 1.7.3
1238
1239- Removed use of array forEach, breaks in older browsers (Martin Hansen)
1240- sinon.deepEqual(new Date(0), new Date()) returns true (G.Serebryanskyi)
1241
1242## 1.7.2
1243
1244- Sinon 1.7 has split calls out to a separate file. This caused some problems,
1245 so 1.7.2 ships with spyCall as part of spy.js like it used to be.
1246
1247## 1.7.1
1248
1249- Fake XMLHttpRequest updated to call onerror and onsuccess callbacks, fixing
1250 jQuery 2.0 problems (Roman Potashow)
1251- Implement XMLHttpRequest progress event api (Marten Lienen)
1252- Added sinon.restore() (Jonny Reeves)
1253- Fix bug where throwing a string was handled incorrectly by Sinon (Brandon Heyer)
1254- Web workers support (Victor Costan)
1255
1256## 1.7.0
1257
1258- Failed release, see 1.7.1
1259
1260## 1.6.0
1261
1262- Add methods to spyCall interface: callArgOn, callArgOnWith, yieldOn,
1263 yieldToOn (William Sears)
1264- sinon.createStubInstance creates a fully stubbed instance from a constructor
1265 (Shawn Krisman)
1266- resetBehavior resets fakes created by withArgs (Martin Sander)
1267- The fake server now logs to sinon.log, if set (Luis Cardoso)
1268- Cleaner npm package that also includes pkg/sinon.js and
1269 pkg/sinon-ie.js for cases where npm is used to install Sinon for
1270 browser usage (Domenic Denicola)
1271- Improved spy formatter %C output (Farid Neshat)
1272- clock.tick returns clock.now (Michael Jackson)
1273- Fixed issue #248 with callOrder assertion
1274 Did not fail if the last given spy was never called (Maximilian Antoni)
1275- Fixed issue with setResponseHeader for synchronous requests (goligo)
1276- Remove msSetImmediate; it only existed in IE10 previews (Domenic Denicola)
1277- Fix #231: not always picking up the latest calls to callsArgWith, etc.
1278 (Domenic Denicola)
1279- Fix failing anonymous mock expectations
1280
1281## 1.5.2
1282
1283- Revert stub.reset changes that caused existing tests to fail.
1284
1285## 1.5.1
1286
1287- Ensure window.Image can be stubbed. (Adrian Phinney)
1288- Fix spy() in IE 8 (Scott Andrews)
1289- Fix sinon base in IE 8 (Scott Andrews)
1290- Format arguments output when mock expectation is not met (kbackowski)
1291- Calling spy.reset directly from stub.reset (Thomas Meyer)
1292
1293## 1.5.0
1294
1295- Don't force "use strict" on Sinon consumers
1296- Don't assume objects have hasOwnProperties. Fixes problem with e.g.
1297 stubbing properties on process.env
1298- Preserve function length for spy (Maximilian Antoni)
1299- Add 'invokeCallback' alias for 'yield' on calls (Maximilian Antoni)
1300- Added matcher support for calledOn (Maximilian Antoni)
1301- Retain original expectation messages, for failed mocks under sinon.test
1302 (Giorgos Giannoutsos)
1303- Allow yields* and callsArg* to create sequences of calls. (Domenic Denicola)
1304- sinon.js can catch itself in endless loop while filling stub prototype
1305 with asynch methods (Jan Kopriva)
1306
1307## 1.4.2
1308
1309- sinon.match for arrays (Maximilian Antoni)
1310
1311## 1.4.1
1312
1313- Strengthen a Node.JS inference to avoid quirky behavior with Mocha
1314 (which provides a shim process object)
1315
1316## 1.4.0
1317
1318- Argument matchers (Maximilian Antoni)
1319 sinon.match.{any, same, typeOf, instanceOf, has, hasOwn, defined, truthy,
1320 falsy} as well as typeOf shortcuts for boolean, number, string, object,
1321 function, array, regexp and date. The result of a call can be used with
1322 spy.calledWith.
1323- spy.returned now works with matchers and compares objects deeply.
1324- Matcher assertions: calledWithMatch, alwaysCalledWithMatch and
1325 neverCalledWithMatch
1326- calledWithNew and alwaysCalledWithNew for assert (Maximilian Antoni)
1327- Easier stubbed fluent interfaces: stub.returnsThis() (Glen Mailer)
1328- allow yields() and family to be used along with returns()/throws() and
1329 family (Glen Mailer)
1330- Async versions `callsArg*` and `yields*` for stubs (TEHEK)
1331- Format args when doing `spy.printf("%*")` (Domenic Denicola)
1332- Add notCalled property to spies
1333- Fix: spy.reset did not reset fakes created by spy.withArgs (Maximilian Antoni)
1334- Properly restore stubs when stubbing entire objects through the sandbox
1335 (Konrad Holowinski)
1336- Restore global methods properly - delete properties that where not own
1337 properties (Keith Cirkel)
1338- setTimeout and setInterval pass arguments (Rodion Vynnychenko)
1339- Timer callbacks that contain a clock.tick no longer fails (Wesley Waser)
1340- spy(undefined, "property") now throws
1341- Prevent multiple restore for fake timers (Kevin Decker)
1342- Fix toString format under Node (Kevin Decker)
1343- Mock expectations emit success and failure events (Kevin Decker)
1344- Development improvement: Use Buster.JS to test Sinon
1345- Fix bug where expect.atLeast failed when minimum calls where received
1346- Make fake server safe to load on node.js
1347- Add support for no args on .withArgs and .withExactArgs (Tek Nynja)
1348- Avoid hasOwnProperty for host objects
1349
1350## 1.3.2
1351
1352- Stronger Node inference in sandbox
1353- Fixed issue with sinon.useFakeTimers() and Rhino.js 1.7R3
1354- Formatting brush-up
1355- FIX Internet Explorer misreporting the type of Function objects
1356 originating in an external window as "object" instead of "function".
1357- New methods stub.callsArgOn, stub.callsArgOnWith,
1358 stub.yieldsOn, stub.yieldsToOn
1359- Implemented
1360- Fixing `clearTimeout` to not throw when called for nonexistent IDs.
1361- Spys that are created using 'withArgs' now get initialized with previous
1362 calls to the original spy.
1363- Minor bug fixes and docs cleanup.
1364
1365## 1.3.1
1366
1367- Fix bug in core sinon: isNode was used for both a variable and a function,
1368 causing load errors and lots of bugs. Should have never left the door.
1369
1370## 1.3.0
1371
1372- Support using bare functions as fake server response handlers (< 1.3.0
1373 required URL and/or method matcher too)
1374- Log some internal errors to sinon.log (defaults to noop). Set sinon.log
1375 to your logging utility of choice for better feedback when.
1376- White-list fake XHRs: Allows some fake requests and some that fall through to
1377 the backend server (Tim Ruffles)
1378- Decide Date.now support at fake-time. Makes it possible to load something that
1379 polyfills Date.now after Sinon loaded and still have Date.now on fake Dates.
1380- Mirror properties on replaced function properties
1381- New methods: spy.yield(), spy.yieldTo(), spy.callArg() and spy.callArgWith()
1382 can be used to invoke callbacks passed to spies (while avoiding the mock-like
1383 upfront yields() and friends). invokeCallback is available as an alias for
1384 yield for people working with strict mode. (Maximilian Antoni)
1385- New properties: spy.firstCall, spy.secondCall, spy.thirdCall and spy.lastCall.
1386 (Maximilian Antoni)
1387- New method: stub.returnsArg(), causes stub to return one of its arguments.
1388 (Gavin Huang)
1389- Stubs now work for inherited methods. This was previously prohibited to avoid
1390 stubbing not-yet-implemented methods. (Felix Geisendörfer)
1391- server.respond() can now accept the same arguments as server.respondWith() for
1392 quick-and-dirty respondWith+respond. (Gavin Huang)
1393- Format objects with buster-format in the default bundle. Default to
1394 util.inspect on node unless buster-format is available (not a hard dependency,
1395 more like a 'preference').
1396
1397- Bug fix: Make sure XHRs can complete even if onreadystatechange handler fails
1398- Bug fix: Mirror entire Date.prototype, including toUTCString when faking
1399- Bug fix: Default this object to global in exposed asserts
1400- Bug fix: sinon.test: use try/finally instead of catch and throw - preserves
1401 stack traces (Kevin Turner)
1402- Bug fix: Fake `setTimeout` now returns ids greater than 0. (Domenic Denicola)
1403- Bug fix: NPM install warning (Felix Geisendörfer)
1404- Bug fix: Fake timers no longer swallows exceptions (Felix Geisendörfer)
1405- Bug fix: Properly expose all needed asserts for node
1406- Bug fix: wrapMethod on window property (i.e. when stubbing/spying on global
1407 functions)
1408- Bug fix: Quote "yield" (Ben Hockey)
1409- Bug fix: callOrder works correctly when spies have been called multiple times
1410
1411## 1.2.0
1412
1413- Bug fix: abort() switches state to DONE when OPENED and sent. Fix by
1414 Tristan Koch.
1415- Bug fix: Mootools uses MSXML2.XMLHTTP as objectId, which Sinon matched with
1416 different casing. Fix by Olmo Maldonado.
1417- Bug fix: When wrapping a non-owned property, restore now removes the wrapper
1418 instead of replacing it. Fix by Will Butler.
1419- Bug fix: Make it possibly to stub Array.prototype.push by not using that
1420 method directly inside Sinon.
1421- Bug fix: Don't assume that req.requestBody is a string in the fake server.
1422- Added spy.printf(format) to print a nicely formatted message with details
1423 about a spy.
1424- Garbage collection: removing fakes from collections when restoring the
1425 original methods. Fix by Tristan Koch.
1426- Add spy.calledWithNew to check if a function was used as a constructor
1427- Add spy.notCalledWith(), spy.neverCalledWith() and
1428 sinon.assert.neverCalledWith. By Max Antoni
1429- Publicly expose sinon.expectation.fail to allow tools to integrate with mock
1430 expectations.
1431- Fake XMLHttpRequests now support a minimal portion of the events API, making
1432 them work seamlessly with e.g. SproutCode (which uses
1433 xhr.addEventListener("readystatechange"). Partially by Sven Fuchs.
1434
1435## 1.1.1
1436
1437- Fix broken mock verification in CommonJS when not including the full Sinon
1438 package.
1439
1440## 1.1.0
1441
1442- The fake server now has a autoRespond method which allows it to respond to
1443 requests on the fly (asynchronously), making it a good fit for mockup
1444 development
1445- Stubs and spies now has a withArgs method. Using it allows you to create
1446 several spies/stubs for the same method, filtered by received arguments
1447- Stubs now has yields and yieldsTo methods for fuzzily invoking callbacks.
1448 They work like callsArgAt only by inferring what callback to invoke, and
1449 yieldsTo can invoke callbacks in object "options" arguments.
1450- Allow sandboxes/collections to stub any property so long as the object
1451 has the property as an own property
1452- Significantly improve error reporting from failed mock expectations. Now prints
1453 all met and unmet expectations with expected and received arguments
1454- Allow mock expectations to be consumed in any order
1455- Add pretty printing of all calls when assertions fail
1456- Fix bug: Stub exception message ended up as "undefined" (string) if not
1457 specified
1458- Pass capture groups in URLs to fakeServer function handlers
1459- Pass through return value from test function in testCase
1460- typeof require is not enough to assume node, also use typeof module
1461- Don't use Object.create in sinon.create. In the off chance that someone stubs
1462 it, sinon will fail mysteriously (Thanks to Espen Dalløkken)
1463- Catch exceptions when parsing DOM elements "on a hunch"
1464 When responding to XHRs, Sinon acts like most browsers and try to parse the
1465 response into responseXML if Content-Type indicates XML or HTML. However, it
1466 also does this if the type is not set. Obviously, this may misfire and
1467 should be caught.
1468- Fix fakeServer.respond() to not drop requests when they are queued during the
1469 processing of an existing queue. (Sven Fuchs)
1470- Clean up module loading in CommonJS environments (Node.js still the only
1471 tested such environment). No longer (temporarily) modifies require.paths,
1472 always loads all modules.
1473
1474## 1.0.2
1475
1476- Fix JSON bug in package.json
1477- Sandbox no longer tries to use a fake server if config says so, but
1478 server is not loaded
1479
1480## 1.0.1
1481
1482- Make sure sinon.sandbox is exposed in node.js (fix by Gord Tanner)
1483
1484## 1.0.0
1485
1486- Switched indentation from 2 to 4 spaces :)
1487- Node.js compatibility improvements
1488- Remove magic booleans from sinon.assert.expose, replace with option object
1489- Put QUnit adapter in its own repository
1490- Update build script to build standalone timers and server files
1491- Breaking change: thisObj -> thisValue
1492 Change brings consistency to the code-base, always use thisValue
1493- Add sinon.assert.pass callback for successful assertions
1494- Extract sandbox configuration from sinon.test
1495
1496 Refactored sinon.test to not do all the heavy lifting in creating sandbox
1497 objects from sinon.config. Now sinon.sandbox.create accepts an optional
1498 configuration that can be retrieved through sinon.getConfig({ ... }) - or, to
1499 match previous behavior, through sinon.getConfig(sinon.config);
1500
1501 The default configuration now lives in sinon.defaultConfig rather than the
1502 previous sinon.test.
1503
1504 This change enables external tools, such as test framework adapters, to easily
1505 create configurable sandboxes without going through sinon.test
1506
1507- Rewrite sinon.clock.tick to fix bug and make implementation clearer
1508- Test config load correct files
1509- Make timers and XHR truly standalone by splitting the IE work-around in two files
1510- Don't fail when comparing DOM elements in sinon.deepEqual (used in calledWith(...))
1511- Should mirror properties on Date when faking it
1512- Added and updated configuration for both JsLint and JavaScript lint
1513- [August Lilleaas] The build script can optionally build a file without the
1514 version name in it, by passing 'plain', i.e. './build plain'.
1515
1516 Useful when using the build script to build and use sinon programatically, so
1517 one can 'cp path/to/sinon/pkg/sinon.js my/scripts/'
1518
1519- [August Lilleaas] Checking and warning if we got a load error and rubygems
1520 isn't present.
1521- [August Lilleaas] Updating build script to be runnable from any
1522 directory. Current working directory doesn't have to be repo root.
1523
1524## 0.8.0
1525
1526- sinon.wrapMethod no longer accepts faking already faked methods
1527- sinon-qunit 'plugin'
1528- sinon.test / sinon.config can now expose the sandbox object
1529
1530## 0.7.2
1531
1532- Add sinon.sandbox.create back in
1533- Fix bug where clock.tick would fire timeouts in intervals when
1534 setInterval was also called
1535
1536## 0.7.1
1537
1538- The fake server will now match paths against full URLs, meaning that
1539 server.respondWith("/", "OK"); will match requests for
1540 "http://currentHost/".
1541- Improved toString method for spies and stubs which leads to more
1542 precise error messages from sinon.assert.\*
1543
1544## 0.7.0
1545
1546- sinon.useFakeTimers now fakes the Date constructor by default
1547- sinon.testCase now fakes XHR and timers by default
1548- sinon.config controls the behavior of sinon.testCase
1549- Fixed bug in clock.tick - now fires timers in correct order
1550- Added the ability to tick a clock string for longer ticks.
1551 Passing a number causes the clock to tick the specified amount of
1552 milliseconds, passing a string like "12:32" ticks 12 minutes and 32
1553 seconds.
1554- calledBefore and calledAfter for individual calls
1555- New assertions
1556 sinon.assert.notCalled
1557 sinon.assert.calledOnce
1558 sinon.assert.calledTwice
1559 sinon.assert.calledThrice
1560- sinon.test now throws if passed anything other than a function
1561- sinon.testCase now throws if passed anything other than an object
1562- sinon.{spy,stub}(obj, method) now throws if the property is not an
1563 existing function - helps avoid perpetuating typo bugs
1564- Vastly improved error messages from assertions
1565- Spies/stubs/expectations can have their names resolved in many cases
1566- Removed feature where sinon.testCase allowed for nested test cases
1567 (does not belong in Sinon.JS)
1568- Organizational change: src/ becomes lib/ Helps npm compatibility
1569- Thanks to Cory Flanigan for help on npm compatibility
1570
1571## 0.6.2
1572
1573- Fixed another bug in sinon.fakeServerWithClock where consecutive
1574 respond() calls did not trigger timeouts.
1575
1576## 0.6.1
1577
1578- Fixed a bug in sinon.fakeServerWithClock where the clock was ticked
1579 before the server had responded to all requests, resulting in
1580 objects not having been responded to by the time the timeout ran.
1581
1582## 0.6.0
1583
1584- FakeXMLHttpRequest
1585- sinon.useFakeXMLHttpRequest
1586- sinon.fakeServer
1587- sinon.fakeServerWithClock
1588- Improved fake timers implementation, made them work properly in IE 6-8
1589- Improved sinon.sandbox
1590 - Added useFakeServer
1591 - Added inject method
1592- Improved sinon.test method
1593 - Made configuration aware
1594 - Now uses sinon.sandbox in place of sinon.collection
1595- Changed default configuration for sinon.test, breaking compatibility
1596 with 0.5.0 - can be changed through sinon.config
1597
1598## 0.5.0
1599
1600- Initial release
1601- Spies, stubs, mocks
1602- Assertions
1603- collections, test, testCase
1604- Fake timers (half-baked)