As of 0.6.0, the ReleaseNotes.md file has been deprecated. Please refer to the release notes available on Github.
Added .spy.on and .spy.object to easily make new spies, for example:
// Returns `fs` but with readFile and readFileSync spied on
var fs = chai.spy.object(fs, ['readFile', 'readFileSync']);
// Shortcut for `fs.writeFile = chai.spy(fs.writeFile)`
chai.spy.on(fs, 'writeFile');Added new assertions:
.called.min(n)/.at.least(n)to assert a spy has been called a minimum ofnmany times..called.max(n)/.at.most(n)to assert that a spy has been called at mostnnumber of times.
-
#9 Add support for component By @pgherveou
-
#15 Add
above/below/at.most/at.leastcall count assertions. By @brandonhorst
-
#10 Fix documentation with
onceBy @pgherveou
Small bugfix, fixing the output of the .called(n) assertion error.
A few new features:
- Add
.with()and.exactly.with()assertion for asserting what arguments a spy was called with.
Ensure spies return the value of their wrapped functions
Add ability for spies to have an (optional) name.
Small bugfixes, improving the AMD wraper
Few minor bugfixes, no new features.
Spies now mimic length of original function.
Add Chai 1.0.0 compatibility.
- #1 Fix README typos and missing link By @JamesMaroney
Initial release