Jestjs 嘲笑托贝和托贝的区别
这在文档中并不明显,但是。。。用Jestjs 嘲笑托贝和托贝的区别,jestjs,Jestjs,这在文档中并不明显,但是。。。用调用和用调用有什么区别?来自文档 .toHaveBeenCalledWith(arg1,arg2,…)别名下:.toBeCalledWith() 从源代码: /。。。 toBeCalledWith:createToBeCalledWithMatcher('toBeCalledWith'), toHaveBeenCalled:CreateToBeecalledMatcher(“toHaveBeenCalled”), toHaveBeenCalledTimes:C
调用和用调用有什么区别?来自文档
.toHaveBeenCalledWith(arg1,arg2,…)
别名下:.toBeCalledWith()
从源代码:
/。。。
toBeCalledWith:createToBeCalledWithMatcher('toBeCalledWith'),
toHaveBeenCalled:CreateToBeecalledMatcher(“toHaveBeenCalled”),
toHaveBeenCalledTimes:CreateToBeenCalledTimesMatcher(“toHaveBeenCalledTimes”),
toHaveBeenCalledWith:CreateToBeenCalledWith匹配器('toHaveBeenCalledWith'),
//...
它们是由createToBeCalledWithMatcher
函数创建的,只使用不同的名称
所以,他们是一样的