1

我正在将一些单元测试从 Jasmine 1.3 迁移到 2.x,我希望有一些简单命令的快速参考备忘单。因为我还没有找到一个,所以我认为发布我到目前为止的内容会有所帮助,其他人可以做出贡献。

4

1 回答 1

7

茉莉花 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()
于 2015-02-03T19:02:46.197 回答