UNPKG

3.41 kBMarkdownView Raw
1# Release Notes
2
3## Note
4
5As of 0.6.0, the ReleaseNotes.md file has been deprecated. [Please refer to the release notes available on Github](https://github.com/chaijs/chai-spies/releases).
6---
7
8## 0.6.0 / 2015-04-24
9
10Added `.spy.on` and `.spy.object` to easily make new spies, for example:
11
12```js
13// Returns `fs` but with readFile and readFileSync spied on
14var fs = chai.spy.object(fs, ['readFile', 'readFileSync']);
15
16// Shortcut for `fs.writeFile = chai.spy(fs.writeFile)`
17chai.spy.on(fs, 'writeFile');
18```
19
20Added new assertions:
21
22 * `.called.min(n)/.at.least(n)` to assert a spy has been called a minimum of
23 `n` many times.
24 * `.called.max(n)/.at.most(n)` to assert that a spy has been called at most `n`
25 number of times.
26
27### Community Contributions
28
29#### Code Features & Fixes
30
31 * [#9](https://github.com/chaijs/chai/pull/9) Add support for component
32 By [@pgherveou](https://github.com/pgherveou)
33
34 * [#15](https://github.com/chaijs/chai/pull/15) Add `above`/`below`/`at.most`/
35 `at.least` call count assertions.
36 By [@brandonhorst](https://github.com/brandonhorst)
37
38 * [#20](https://github.com/chaijs/chai/pull/20) Fix output for `.called()`
39 By [@Ryckes](https://github.com/Ryckes)
40
41 * [#21](https://github.com/chaijs/chai/pull/21) Add `.spy.on` and `.spy.object`
42 methods.
43 By [@stalniy](https://github.com/stalniy)
44
45#### Documentation fixes
46
47 * [#10](https://github.com/chaijs/chai/pull/10) Fix documentation with `once`
48 By [@pgherveou](https://github.com/pgherveou)
49
50 * [#16](https://github.com/chaijs/chai/pull/16) Add `.with` docs
51 By [@plaxdan](https://github.com/plaxdan)
52
53 * [#17](https://github.com/chaijs/chai/pull/17) Fix small typo in docs
54 By [@Ryuno-Ki](https://github.com/Ryuno-Ki)
55
56 * [#19](https://github.com/chaijs/chai/pull/19) Fix a handful of typos in
57 README.md
58 By [@sateffen](https://github.com/sateffen)
59
60## 0.5.1 / 2012-11-15
61
62Small bugfix, fixing the output of the `.called(n)` assertion error.
63
64## 0.5.0 / 2012-11-14
65
66A few new features:
67
68 - Add `.with()` and `.exactly.with()` assertion for asserting what arguments
69 a spy was called with.
70
71## 0.4.0 / 2012-10-09
72
73Ensure spies return the value of their wrapped functions
74
75### Community Contributions
76
77#### Code Features & Fixes
78
79 * [#5](https://github.com/chaijs/chai/pull/5) Make spies have a return value.
80 By [@tregusti](https://github.com/tregusti)
81
82## 0.3.0 / 2012-07-11
83
84Add ability for spies to have an (optional) name.
85
86### Community Contributions
87
88#### Code Features & Fixes
89
90 * [#3](https://github.com/chaijs/chai/pull/3) Add an optional name to spies
91 By [@tregusti](https://github.com/tregusti)
92
93#### Documentation fixes
94
95 * [#2](https://github.com/chaijs/chai-spies/pull/2) Fix typos in `called.twice`
96 assertion
97 By [@tregusti](https://github.com/tregusti)
98
99 * [#3](https://github.com/chaijs/chai-spies/pull/2) Fix various typos
100 By [@tregusti](https://github.com/tregusti)
101
102
103## 0.2.3 / 2012-07-09
104
105Small bugfixes, improving the AMD wraper
106
107## 0.2.2 / 2012-05-17
108
109Few minor bugfixes, no new features.
110
111## 0.2.1 / 2012-05-17
112
113Spies now mimic length of original function.
114
115## 0.2.0 / 2012-05-16
116
117Add Chai 1.0.0 compatibility.
118
119### Community Contributions
120
121#### Documentation fixes
122
123 * [#1](https://github.com/chaijs/chai-spies/pull/1) Fix README typos and
124 missing link
125 By [@JamesMaroney](https://github.com/JamesMaroney)
126
127## 0.1.0 / 2012-02-13
128
129Initial release