QUnit VS Jasmine?

这两种测试框架之间的主要区别是什么?

对于测试驱动开发,我是一个全新的人,从一开始就是这样。

20549 次浏览

QUnit is very easy to get started with, as you only need to include two files and a little bit of markup, then you can start writing tests.

Jasmine strength, afaik is its BDD-style syntax, if that is something that you prefer (probably not a selling point for you) and tight integration into Ruby/Rails tools.

In the end both get the job done. I recommend to start with QUnit. Once you're feeling comfortable, try Jasmine and check if the BDD style fits better. If it does and you still want to keep using QUnit, you can add Pavlov to the mix, which provides BDD-style methods for QUnit.