Attempted to wrap getInheritList which is already wrapped

背景:使用vue-jest 中使用sinon 进行模拟axios请求 ,代码长这样

it('案件继承列表', function() {

sinon.stub(api, 'getInheritList').returns({code:1,list:[{mediatorName:'瑞秋啊'}]});

const data = wrapper.vm._getCaseList()

wrapper.vm.caseList = data.list

expect(wrapper.vm.caseList).toEqual([{mediatorName:'瑞秋啊'}])

})

Attempted to wrap getInheritList which is already wrapped
Attempted to wrap getInheritList which is already wrapped
求解 哪里有问题吗
新手很懵

以上是 Attempted to wrap getInheritList which is already wrapped 的全部内容, 来源链接: utcz.com/p/937198.html

回到顶部