我想监视一个函数,然后在函数完成/初始调用时执行回调。以下有点简单,但显示了我需要完成的工作://sendaspytoreportonthesoviet.GoldenEyemethodfunctionvarjames_bond=sinon.spy(soviet,"GoldenEye");//tellMaboutthesuperWeapongettingfiredviasatellitephonejames_bond.callAfterExecution({console.log("Thefunctiongotcalled!EvacuateLondon!");console.log(te