spy.restore() 僅在使用以下初始化時才有用: let someSpy = sinon.spy(obj, 'someFunction'); 這將用spy 替換 obj.someFunction 。如果您想返回原始版本,請使用 ...
確定! 回上一頁