阅读背景:

如何在每次测试之前重置Jest模拟函数调用计数

来源:互联网 

I'm new to Jest, I'm trying to use it for testing if a function was called or not. I noticed the mock.calls.length is not resetting for every test but accumulating. How can I make it 0 before every test? I don't want my next tests depends on the results of the previous.I'm new to Jest, I'm trying to use it for testi




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: