If someone understands the tests, please tell me how you can implement the test of two things:

  1. Whether the obj.newRing({}); method was called obj.newRing({}); when running the makeRing function?
  2. Does the num parameter passed to the makeRing(num) function makeRing(num) property of the object passed to obj.newRing({ number: num}) ?

Actually, the tested function:

 function makeRing(num) { currRing = obj.newRing({ number: num }); } 

Can someone have any thoughts on how to use sinon or anything else in this situation?

  • Where does obj get into the function? - Dmitriy Simushev

0