Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 543
ma11hew28 Avatar asked Nov 06 '10 22:11

ma11hew28


3 Answers

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.

like image 146
Rahman Kalfane Avatar answered Nov 20 '22 10:11

Rahman Kalfane


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.

like image 29
Julian Birch Avatar answered Nov 20 '22 11:11

Julian Birch


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.

like image 1
fuzzyalej Avatar answered Nov 20 '22 11:11

fuzzyalej