Skip to content

0.6.0 / 2015-04-24

Compare
Choose a tag to compare
@keithamus keithamus released this 26 Apr 15:45

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 of
    n many times.
  • .called.max(n)/.at.most(n) to assert that a spy has been called at most n
    number of times.

Community Contributions

Code Features & Fixes

Documentation fixes