Advertisement
markoczy

Sinon Print Calls

Jun 21st, 2018
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const printCalls = function(spy, name) {
  2.     console.log('Printing calls, function:', name);
  3.  
  4.     let count = 0;
  5.     for (let call of spy.getCalls()) {
  6.         console.log(`call ${count++}:`, call.args);
  7.     }
  8. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement