替换对象的所有方法: var stub = sinon.stub(obj);. 例如我们实现了一个 Calculator ,现在我们要测试 Calculator.multiply 。 它会调用 Calculator.plus ...
確定! 回上一頁