Skip to content

Instantly share code, notes, and snippets.

@leftieFriele
Created August 26, 2012 18:17
Show Gist options
  • Save leftieFriele/3482278 to your computer and use it in GitHub Desktop.
Save leftieFriele/3482278 to your computer and use it in GitHub Desktop.
JavaScript unit test showdown
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
@jcpgithub
Copy link

jasmine

@gregersrygg
Copy link

Buster!

@hansogj
Copy link

hansogj commented Aug 28, 2012

Jeg får prøve meg på Mocha da ( og prøve å ungå å trampe i Plumbo-baret )

@leftieFriele
Copy link
Author

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

@sveisvei
Copy link

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