4 ms·
Does this provide any advantages over Jasmine for JavaScript BDD called by Karma (formerly Testacular) as the Test Runner? http://pivotal.github.io/jasmine/ ht
by EzGraphs 13y ago
Does this provide any advantages over Jasmine for JavaScript BDD called by Karma (formerly Testacular) as the Test Runner?
http://pivotal.github.io/jasmine/ http://pivotal.github.io/jasmine/
http://karma-runner.github.io/0.8/index.html http://karma-runner.github.io/0.8/index.html
- CalinBalauru 13y agoThis is closer to rspec and the best practices for bdd. I find Jasmine closer to mini test I mostly use jasmine but they are both excellent frameworks.
- abe33 13y agoI must say that I'm also a user and lover of jasmine, all the previous lib I did was tested using Jasmine. However, I was missing some feature from RSpec (Jasmine, like Mocha, takes a big part of their syntax from RSpec), such implicit subjects, let blocks, self-describing matchers, etc. If I were to list some of the advantages of Spectacular over Jasmine, I'll say there is: - native nodejs support: Jasmine was primarily intended for browsers, and the jasmine-node module isn't guaranteed to use the latest jasmine version. - subject, auto-subject describe and implicit subject in test. This is quite handy and when combined with CoffeeScript syntax it leads to very readable tests - first class async support: asynchronous tests aren't just an edge case, but are at the root of the framework. Even matchers can be asynchronous, allowing to write matchers such as the shoulda's have_db_column matcher, that, in a javascript context, will have to rely on asynchronous API. - built-in factories in FactoryGirl fashion. - tests randomization - tests dependencies - out-of-the-box phantomjs and slimerjs support As a last word I want to say that, at the beginning of this project, the idea was to see how I could build a BDD/TDD framework using BDD/TDD, and, as a RSpec user, I wanted to have the same kind of feeling that I can have when I write RSpec tests: simplicity, readability, reusability, etc. In the end it grew as something that could benefit others and so I pushed the development further in order to provides a full and robust framework.