开发者

JavaScript BDD: Vows & Kyuri Vs. Jasmine [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. 开发者_JS百科 Closed 10 years ago.

I was going to go with Vows and Kyuri, but then I found out about Jasmine. Which do you recommend? Vows or Jasmine? Is there a Cucumber implementation that works with Jasmine?


Jasmine

Pros :

  • Well documented and supported
  • Built-in spies
  • RSPec-ish DSL
  • Nice integration with other tools

Cons :

  • Pollutes global namespace
  • Not built for NodeJS

Vows

Pros :

  • Clean and meaningful syntax
  • Created for NodeJS (ie. Asynchronous Testing)
  • CoffeeScript (it is really beautiful with)
  • Watcher out of the box

Cons :

  • Documentation (eg. teardown functions)
  • Batches & Contexts can be odd when beginning
  • No built-in spies (SinonJS ftw)

I would prefer Vows for testing NodeJS applications and Jasmine for client side code. Once you get used to CoffeeScript, vows becomes really clean and powerful.


I think it's important to note that Kyuri doesn't really do the same thing as Cucumber. It's actually just the gherkin bit. You could implement the functionality on top, but it's not coming out of the box.

Personally, I'm using vows. It's a bit brain-bending, but it's relatively simple and has a syntax which works better with CoffeeScript, which I'm very fond of. Also, I don't really want to involve Ruby in my build process, although your mileage may vary and I reserve the right to change my mind about that one.


I think jasmine is more suitable for unit testing in javascript. Is really simple and powerful, quite straightforward to get it and integrates nice with other tools such as rake or rails.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜