If someone understands the tests, please tell me how you can implement the test of two things:
- Whether the
obj.newRing({});method was calledobj.newRing({});when running themakeRingfunction? - Does the
numparameter passed to themakeRing(num)functionmakeRing(num)property of the object passed toobj.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?
objget into the function? - Dmitriy Simushev