Free over-the-air beta distribution Quick. Painless. Magical*.
This is the first of a two part introduction on how to write testable Javascript UI code. The first article presents a sample application that contains several common anti-patterns and how these can be refactored to be more testable. The complete refactor is presented in the second article along with info on how to add a unit test suite and make use of mocks. Front end development comes with a set
Why do we hate testing? How do we test JavaScript? How do we test Backbone.JS? (Credits to @searls for slides 6 through 12, used with permission).
TDD Advent Calendar jp: 2012 ã®1æ¥ç®ã§ãã åæ¥ã¨ãããã¨ã§ãTDDãã¨ãã¾ãç°å¢ã«ã¤ãã¦æµ ãçãç´¹ä»ãããã¨æãã¾ãã TDD(Test Driven Development=ãã¹ãé§åéçº)ã¨ã¯ä½ãï¼ æ®éã®éçºã 㨠å®è£ ãã¦ å ¨é¨çµãã£ããã¦ããããã¹ã TDDã 㨠ã¦ããããã¹ã å®è£ ãªãã¡ã¯ã¿ãªã³ã°ï¼å®è£ ã®ç²åº¦ã«ãã£ã¦ã¯ãã£ãããªãã£ããï¼ 1ã«æ»ã æ®éã¯ä¸éãå®è£ ãçµãã£ã¦ãããã¹ããæ¸ãã¨æãã¾ãã*1ãå ã«ãã¹ããæ¸ããã¨ï¼ãã¹ããã¡ã¼ã¹ãï¼ã§å ¨ä½çã«ã¡ã³ãããããã³ã¼ãã«ã§ãã¾ãã 詳ãã㯠wikipedia:ãã¹ãé§åéçº åç §ã TDDããããã¨ã«ããä½ãå¬ããã æåãããã¹ãæããã§å®è£ ãããããããã¹ããç¶²ç¾ ããã¦ãã å¾ãããã¹ããæ¸ãå ´åãã¹ããããã¨ãåæã¨ããã¦ããªããã¨ãå¤ããããå®ã¯ãã£ã¡ã®æ¹ãé£ããã¨æãã¾ã ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}