待测试的代码:

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

jasmine.FunctionMatchers.toHaveBeenCalledWith的单步调试

deliveryModes的数据来源为:

jasmine.FunctionMatchers.toHaveBeenCalledWith的单步调试

往上看,deliveryModes的根源是supportedDeliveryModes:

jasmine.FunctionMatchers.toHaveBeenCalledWith的单步调试

所以FunctionMatchers.toHaveBeenCalledWith的参数为mockSupportedDeliveryModes:

jasmine.FunctionMatchers.toHaveBeenCalledWith的单步调试

要获取更多Jerry的原创文章,请关注公众号"汪子熙":
jasmine.FunctionMatchers.toHaveBeenCalledWith的单步调试

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2021-04-22
  • 2021-09-18
  • 2022-12-23
  • 2021-08-21
猜你喜欢
  • 2021-11-20
  • 2022-12-23
  • 2021-12-05
  • 2021-11-20
  • 2021-03-30
  • 2021-10-21
  • 2022-01-28
相关资源
相似解决方案