forked from sinonjs/sinon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Changelog.txt
155 lines (139 loc) · 6.95 KB
/
Changelog.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
== 1.1.1 / 2011-05-17
* Fix broken mock verification in CommonJS when not including the full Sinon
package.
== 1.1.0 / 2011-05-04
* The fake server now has a autoRespond method which allows it to respond to
requests on the fly (asynchronously), making it a good fit for mockup
development
* Stubs and spies now has a withArgs method. Using it allows you to create
several spies/stubs for the same method, filtered by received arguments
* Stubs now has yields and yieldsTo methods for fuzzily invoking callbacks.
They work like callsArgAt only by inferring what callback to invoke, and
yieldsTo can invoke callbacks in object "options" arguments.
* Allow sandboxes/collections to stub any property so long as the object
has the property as an own property
* Significantly improve error reporting from failed mock expecations. Now prints
all met and unmet expectations with expected and received arguments
* Allow mock expectations to be consumed in any order
* Add pretty printing of all calls when assertions fail
* Fix bug: Stub exception message ended up as "undefined" (string) if not
specified
* Pass capture groups in URLs to fakeServer function handlers
* Pass through return value from test function in testCase
* typeof require is not enough to assume node, also use typeof module
* Don't use Object.create in sinon.create. In the off chance that someone stubs
it, sinon will fail mysteriously (Thanks to Espen Dalløkken)
* Catch exceptions when parsing DOM elements "on a hunch"
When responding to XHRs, Sinon acts like most browsers and try to parse the
response into responseXML if Content-Type indicates XML or HTML. However, it
also does this if the type is not set. Obviously, this may misfire and
should be caught.
* Fix fakeServer.respond() to not drop requests when they are queued during the
processing of an existing queue. (Sven Fuchs)
* Clean up module loading in CommonJS environments (Node.js still the only
tested such environment). No longer (temporarily) modifies require.paths,
always loads all modules.
== 1.0.2 / 2011-02-22
* Fix JSON bug in package.json
* Sandbox no longer tries to use a fake server if config says so, but
server is not loaded
== 1.0.1 / 2010-12-20
* Make sure sinon.sandbox is exposed in node.js (fix by Gord Tanner)
== 1.0.0 / 2010-12-08
* 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 it's 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.
== 0.8.0 / 2010-10-30
* sinon.wrapMethod no longer accepts faking already faked methods
* sinon-qunit 'plugin'
* sinon.test / sinon.config can now expose the sandbox object
== 0.7.2 / 2010-10-25
* Add sinon.sandbox.create back in
* Fix bug where clock.tick would fire timeouts in intervals when
setInterval was also called
== 0.7.1 / 2010-10-16
* The fake server will now match paths against full URLs, meaning that
server.respondWith("/", "OK"); will match requests for
"http://currentHost/".
* Improved toString method for spies and stubs which leads to more
precise error messages from sinon.assert.*
== 0.7.0 / 2010-09-19
* sinon.useFakeTimers now fakes the Date constructor by default
* sinon.testCase now fakes XHR and timers by default
* sinon.config controls the behavior of sinon.testCase
* Fixed bug in clock.tick - now fires timers in correct order
* Added the ability to tick a clock string for longer ticks.
Passing a number causes the clock to tick the specified amount of
milliseconds, passing a string like "12:32" ticks 12 minutes and 32
seconds.
* calledBefore and calledAfter for individual calls
* New assertions
sinon.assert.notCalled
sinon.assert.calledOnce
sinon.assert.calledTwice
sinon.assert.calledThrice
* sinon.test now throws if passed anything other than a function
* sinon.testCase now throws if passed anything other than an object
* sinon.{spy,stub}(obj, method) now throws if the property is not an
existing function - helps avoid perpetuating typo bugs
* Vastly improved error messages from assertions
* Spies/stubs/expectations can have their names resolved in many cases
* Removed feature where sinon.testCase allowed for nested test cases
(does not belong in Sinon.JS)
* Organizational change: src/ becomes lib/ Helps npm compatibility
* Thanks to Cory Flanigan for help on npm compatibility
== 0.6.2 / 2010-08-12
* Fixed another bug in sinon.fakeServerWithClock where consecutive
respond() calls did not trigger timeouts.
== 0.6.1 / 2010-08-12
* Fixed a bug in sinon.fakeServerWithClock where the clock was ticked
before the server had responded to all requests, resulting in
objects not having been responded to by the time the timeout ran.
== 0.6.0 / 2010-08-10
* FakeXMLHttpRequest
* sinon.useFakeXMLHttpRequest
* sinon.fakeServer
* sinon.fakeServerWithClock
* Improved fake timers implementation, made them work properly in IE 6-8
* Improved sinon.sandbox
* Added useFakeServer
* Added inject method
* Improved sinon.test method
* Made configuration aware
* Now uses sinon.sandbox in place of sinon.collection
* Changed default configuration for sinon.test, breaking compatibility
with 0.5.0 - can be changed through sinon.config
== 0.5.0 / 2010-06-09
* Initial release
* Spies, stubs, mocks
* Assertions
* collections, test, testCase
* Fake timers (half-baked)