JSSpec
JSSpecã§ã¯ãåexampleå®è¡åã®æºåãå¾å§æ«ãè¡ãé¢æ°ã¨ãã¦before,after,before_all,after_allã使ãã¾ããxUnitã§ã®setUpãtearDownã«ç¸å½ãããã®ã§ããªãåé¢æ°ã®èª¬æã¯ä»¥ä¸ã®éãã before åexampleã®åã«ãæ¯åå®è¡ããã¾ãã after åexampleã®å¾ã«â¦
JSSpecã§ä½¿ããshould_beã使ã£ã¦ãããããªãªãã¸ã§ã¯ããæ¯è¼ããå ´åã®åä½ã確èªããã®ã§ããã¤ã³ãã注æç¹ãã¾ã¨ãã¦ããã¾ãã ãªãã¸ã§ã¯ãã¯ãå±æ§ãä¸è´ããã?ãã§è©ä¾¡ããã模æ§ã ã{}ãã§ä½æãããã®ã ãã§ãªãããnewãã§ä½æããããªãã¸ã§â¦
JavaScriptã®ãã¹ããããããã¡ããã¨ãããããªãã¨æã£ã¦ãã¹ãã£ã³ã°ãã¬ã¼ã ã¯ã¼ã¯ãæ¤è¨ä¸ãJavaScriptã®xUnitç³»ãã¬ã¼ã ã¯ã¼ã¯ã«ã¯ããã¾ãããã®ããªãã£ãè¨æ¶ãããã®ã§ãBDDç³»ã§æ¢ãã¦ã¿ãã¨JSSpecããããããªããªãè¯ããããªã®ã§ã¡ãã£ã¨ä½¿ã£â¦