Jasmine 1.3 到 Jasmine 2.x 作弊 sheet

Jasmine 1.3 to Jasmine 2.x cheat sheet

我正在将一些单元测试从 Jasmine 1.3 迁移到 2.x,我希望有一些简单命令的快速参考作弊 sheet。由于我还没有找到,我认为它会对 post 我目前所拥有的和其他人可以贡献的东西有所帮助。

茉莉花 1.3 -> 茉莉花 2.x

  argsForCall[0] -> calls.argsFor(0)
  calls[0].args[1] -> calls.argsFor(0)[1]
  mostRecentCall -> calls.mostRecent()
  reset() -> calls.reset()
  callCount -> calls.count()
  andReturn -> and.returnValue
  andCallFake -> and.callFake
  andCallThrough() -> and.callThrough()