Jest 异步代码 测试要注意的点

Jest 异步代码测试中,有一些点,咱们记录一下。promise 若是要测的是回调函数,那么能够使用done 函数。app 官网是以下解释的:异步 Instead of putting the test in a function with an empty argument, use a single argument called done. Jest will wait until the 
相关文章
相关标签/搜索