Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JavaScript UnitTest PIXNET

JavaScript UnitTest PIXNET

JavaScript UnitTest

CypressKuo

July 21, 2016
Tweet

More Decks by CypressKuo

Other Decks in Technology

Transcript

  1. Agenda Test 3W Unit Test (1 W 1 H) TDD

    & BDD Test Runner & Testing Framework 2
  2. User story:[帳⼾持有⼈要領錢] ⾝為⼀個 [帳⼾持有⼈],我想要 [從 atm 領 錢],以便 [可以在銀⾏關⾨後領到錢] Given

    [帳⼾餘額 100] and [有效的領款卡] and [提款機夠錢] When [帳⼾持有⼈要求提 20 元] Then [提款機應該給 20] and [帳⼾餘額 80] and [退提款卡] 10
  3. 租⽚系統 普通⽚
 租⾦ 100 元 / 7天、逾期 10 元 /

    天 新⽚
 租⾦ 150 元 / 3天、逾期 30 元 / 天 兒童⽚
 租⾦ 40 元 / 5天、逾期 5 元 / 天 13
  4. Reference https:/ /karma-runner.github.io/0.13/config/configuration- file.html http:/ /www.slideshare.net/wantingj/tdd-bdd-47559903 http:/ /fbukevin.github.io/Veck/2015/01/07 /javascript-test- suit-4-test-runner-karma/

    http:/ /www.codedata.com.tw/java/unit-test-the-way- changes-my-programming http:/ /www.slideshare.net/yvonne_yu/ss-51379324 http:/ /oomusou.io/phpstorm/phpstorm-tdd-refactor/ 22