使用Sinon,我们可以使用test-doubles替换任何javascript函数,并提供很多方便测试 ... 1 //非常重要的步骤--拆除spy setNameSpy.restore(); 复制代码 ...
確定! 回上一頁