我刚刚将我的 lodash 导入从 更改import _ from 'lodash';为import debounce from 'lodash/debounce';
在我的测试中我曾经有过sandbox.stub(_, 'debounce').returnsArg(0);,但现在我不知道将其更改为什么。显然sandbox.stub(debounce).returnsArg(0);行不通。当模块中只导出一个函数时,不确定该怎么做。
郎朗坤
一只斗牛犬
Helenr
随时随地看视频慕课网APP
相关分类