看看sinon文档中的例子: { setUp: function () { sinon.spy(jQuery, "ajax"); }, tearDown: function () { jQuery.ajax.restore(); // Unwraps the ...
確定! 回上一頁