Skip to content

Instantly share code, notes, and snippets.

@jfstgermain
Created February 14, 2017 22:43
Show Gist options
  • Select an option

  • Save jfstgermain/497c8bf71762428a331c16306edf0a2e to your computer and use it in GitHub Desktop.

Select an option

Save jfstgermain/497c8bf71762428a331c16306edf0a2e to your computer and use it in GitHub Desktop.
logger = {
log: sinon.spy()
};
const greetings = moduleA.greet('Joe Trudeau', logger);
expect(logger.log).to.have.been.calledOnce;
expect(logger.log).to.have.been.calledWith('Greeting: Joe Trudeau');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment