Skip to content

Instantly share code, notes, and snippets.

@jfstgermain
Created February 14, 2017 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfstgermain/497c8bf71762428a331c16306edf0a2e to your computer and use it in GitHub Desktop.
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