由于一些设计问题,我不得不在一个特殊的钩子中存根一个对象的函数。问:如何避免两次固执?throws "undefined is not a function" if `doSOmething`sinon.stub; });
//throw an exception if `doSomething` fu
看来sinon可能没有正确地恢复一个短截原型。在我把它报告为窃听器之前,有人能告诉我我是否做错了什么吗?这是失败的:it('passeshost and port to the net.Socket().connect()', sinon.test(function() {
var stub = sinon.stub(ne
我有几个使用Axios调用的组件,我正在尝试“存根”这些函数,但是,我在故事书“试图包装已经包装的get”上收到了以下错误。我想知道是否有一种方法可以多次定义存根,因为我尝试在每个sinon.reset()的末尾使用compXX.stories.js (),但是它不起作用。comp123.stories.jsimport Vue from 'vue';
import sin