Jasmine is a great library, especially for anyone coming from the Rspec world. The syntax is incredibly similar to Resp, and when Jasmine is written in CoffeeScript, it's one of the most readable testing libraries I've seen (in any language).
The biggest benefit to Vows is its "everything can be async" nature. This approach makes testing incredibly fast. It's also built in a very modular way that allows for what it calls "batching" - which is really just test metaprogramming. Vows-bdd is just using this capacity for metaprogramming, so it's not too much more than a "mini-DSL" on top of Vows itself.
Vows-bdd is very much inspired by two libraries from Nodejitsu: prenup (a general purpose fluent vocabulary on top of vows) and api-easy (which uses Vows for simple, readable testing of API endpoints). All three of these libraries aren't really doing anything more than pre-wiring Vows tests together. I think it's a reflection of Vows' power that it can be so easily metaprogrammed in this style.
It looks pretty nice from the example given. One of my biggest complaints about node.js is the testing frameworks produce some very hard to read and maintain code.
I'm currently using vows for my unit tests and expresso for my integrated testing. I'll give vows-bdd a try in place of expresso when I get a chance.
Thanks! I've been happy with how simple vows-bdd has made construction of my integration tests.
One big benefit of expresso are its helpers. While it's not difficult to supplement Vows with similar functions, Vows still doesn't have a built-in approach for pre-test bootstrapping.
I looked at vows and Jasmine and a few of the other RSpec-inspired libraries for Javascript/CoffeeScript. What I determined was that Javascript simply doesn't have the necessary features to properly replicate RSpec's syntax. For example, if you want to run tests against Internet Explorer, you can't use any method_missing or noSuchMethod magic.
I adapted bits and pieces of CoffeeScript's cakefile. It basically defines `function test(description, runTest)` and uses the builtin node assert module. Simple and got the job done:
6 comments
[ 2.9 ms ] story [ 19.8 ms ] threadIs vows-bdd like a Cucumber to vows'/jasmine's RSpec?
The biggest benefit to Vows is its "everything can be async" nature. This approach makes testing incredibly fast. It's also built in a very modular way that allows for what it calls "batching" - which is really just test metaprogramming. Vows-bdd is just using this capacity for metaprogramming, so it's not too much more than a "mini-DSL" on top of Vows itself.
Vows-bdd is very much inspired by two libraries from Nodejitsu: prenup (a general purpose fluent vocabulary on top of vows) and api-easy (which uses Vows for simple, readable testing of API endpoints). All three of these libraries aren't really doing anything more than pre-wiring Vows tests together. I think it's a reflection of Vows' power that it can be so easily metaprogrammed in this style.
I'm currently using vows for my unit tests and expresso for my integrated testing. I'll give vows-bdd a try in place of expresso when I get a chance.
One big benefit of expresso are its helpers. While it's not difficult to supplement Vows with similar functions, Vows still doesn't have a built-in approach for pre-test bootstrapping.
I adapted bits and pieces of CoffeeScript's cakefile. It basically defines `function test(description, runTest)` and uses the builtin node assert module. Simple and got the job done:
https://github.com/jashkenas/coffee-script/blob/master/Cakef...