你往往更多的用到stub。但当你需要验证某个函数是否被调用过时,spy还是很方便的: function myFunction(condition, callback){ if(condition){ ...
確定! 回上一頁