SAP

jasmine.FunctionMatchers.toHaveB

2021-01-19  本文已影响0人  华山令狐冲

待测试的代码:

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

deliveryModes的数据来源为:

往上看,deliveryModes的根源是supportedDeliveryModes:

所以FunctionMatchers.toHaveBeenCalledWith的参数为mockSupportedDeliveryModes:

上一篇 下一篇

猜你喜欢

热点阅读