jasmine.spy对象的and.returnValue方法单步调试

都已经是被spy之后的方法了:

jasmine.spy对象的and.returnValue方法单步调试
jasmine.spy对象的and.returnValue方法单步调试

CallTracker.track就是把调用上下文放到一个calls数组里:

jasmine.spy对象的and.returnValue方法单步调试

delegate给strategy:

jasmine.spy对象的and.returnValue方法单步调试

真正的执行体:

jasmine.spy对象的and.returnValue方法单步调试

返回一个Observable对象:

jasmine.spy对象的and.returnValue方法单步调试

最后拿到了mock data:

jasmine.spy对象的and.returnValue方法单步调试

要获取更多Jerry的原创文章,请关注公众号"汪子熙":
jasmine.spy对象的and.returnValue方法单步调试

相关文章:

  • 2021-11-20
  • 2021-10-22
  • 2022-12-23
  • 2021-08-17
  • 2021-08-28
  • 2022-12-23
  • 2022-12-23
  • 2022-02-16
猜你喜欢
  • 2021-11-27
  • 2021-11-11
  • 2021-12-14
  • 2021-06-24
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案