美文网首页SAP
jasmine.FunctionMatchers.toHaveB

jasmine.FunctionMatchers.toHaveB

作者: 华山令狐冲 | 来源:发表于2021-01-19 10:57 被阅读0次

待测试的代码:

checkoutConfigService会调用getPreferredDeliveryMode, 输入的参数值为deliveryModes:

deliveryModes的数据来源为:

往上看,deliveryModes的根源是supportedDeliveryModes:

所以FunctionMatchers.toHaveBeenCalledWith的参数为mockSupportedDeliveryModes:

相关文章

网友评论

    本文标题:jasmine.FunctionMatchers.toHaveB

    本文链接:https://www.haomeiwen.com/subject/jkyxmktx.html