Created
August 26, 2012 18:17
-
-
Save leftieFriele/3482278 to your computer and use it in GitHub Desktop.
JavaScript unit test showdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contestants: | |
=============================================== | |
Jasmine - http://pivotal.github.com/jasmine/ | |
BusterJS - busterjs.org | |
jsTestDriver - http://code.google.com/p/js-test-driver/ (https://plus.google.com/100948987862442440080/posts) | |
Mocha + Chai - http://visionmedia.github.com/mocha/ and http://chaijs.com/ | |
QUnit - http://qunitjs.com/ | |
CasperJS - http://casperjs.org/ | |
Things to take into the evaluation: | |
=============================================== | |
- Supports automated browser test | |
- Can be run on our CI server which is Bamboo using Maven | |
- Is the project actively being updated? Last release? Number of commiters? | |
The Task: | |
=============================================== | |
<form> | |
<label>Email:</label> | |
<input name="email" type="text" value="" placeholder="Write email which to subscribe"> | |
<input type="submit" value="Sign me up" disabled> | |
</form> | |
- email field can not be empty (or the placeholder text) and for simplicity it only needs an @ and . in it to be valid | |
- enable button when email field is valid | |
- Add this element, <p>Thanks for signing up!</p>, after submitting | |
jasmine
Buster!
Jeg får prøve meg på Mocha da ( og prøve å ungå å trampe i Plumbo-baret )
QUnit:
- runs without any hassle on any device
- dead easy to get started
- great option for doing quick prototypes and stuff
- simple syntax and lots of documentaiton and a large community
Testling
- Konge mange browsertargets (browserling)
- Like stack-traces på alle browsere
- enkelt og greit
- komplisert når det blir mange filer potensiellt, delvis grunnet bruk av curl - kan vel enkelt fikses med et script
- må bruke testling testrammeverk foreløpig
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'll take QUnit