Jarvis: Another JavaScript Unit Testing Framework

This article was originally published in my blog (affectionately referred to as blargh) on . The original blog no longer exists as I've migrated everything to this wiki.

The original URL of this post was at https://tmont.com/blargh/2011/6/jarvis-another-javascript-unit-testing-framework. Hopefully that link redirects back to this page.

NIH (not invented here) is a syndrome from which I suffer. Luckily, I'm pretty good about not suffering from it when somebody else is paying me to do something in a timely manner. But if I'm working on my own personal project, you can bet I will be inventing a universe before releasing something.

And out popped Jarvis. Another unit testing framework for JavaScript.

YAWN.

Anyway, I wrote my own because:

  1. It's fun (seriously)
  2. I've done it before in PHP and C♯
  3. I didn't really like the other ones available (disclaimer: I didn't actually look at any of the other ones available)

Clearly, it was a good decision.

Features

  • Assertions (ooh!)
  • Assertions on the DOM using jQuery (i.e. Sizzle) selectors
  • Stack traces!
  • Displays fancy diffs for string comparisons!
  • Uses itself to test itself!
  • Gradients! Drop shadows! CSS3! Web 2.0!
  • Exclamation points!

Here's a gratuitous screenshot:

jarvis example

Read more/try a demo at the main site.