2015-02-03 6 views
1

Jasmine 1.3에서 2.x로 일부 단위 테스트를 마이그레이션 중이며 일부 간단한 명령에 대한 빠른 참조 치트 시트가 있었으면합니다. 나는 내가 지금까지 가지고있는 것과 다른 사람들이 기여할 수있는 것을 게시하는 것이 도움이 될 것이라고 생각했다.Jasmine 1.3에서 Jasmine 2.x 치타 용지

답변

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()