Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Write JavaScript tests that don't need no stinkin' browser.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
examples
js
lib
spec
README
Rakefile

README

= Test-JS =

For writing JavaScript tests that don't need any stinkin' browser.

Currently, this project only supports the built-in testing framework
I've written. I'd love to make it extensible enough to just plug into
any of the other JS testing frameworks out there. Screw.Unit provides
awesome hooks for extensibility, where I could just create a new Result
object from the "passed", "failed" or "errored" events. I imagine other
JS frameworks would be a bit more difficult, but still good to use.

== USAGE (still really early, probably quite buggy) ==

Running the testjs bin and pointing it at a test file:

  testjs examples/person_test.js

will yield results like this:

  .....
  Finished in 0.00228 seconds

  5 tests

If there are failures or errors, these will be reported as well.

== DOM ==

If you _must_ have the DOM, you can pass the "--dom" option. This will
include Johnson's DOM, as well as jQuery for convenience:

  testjs examples/dommy_test.js --dom

=== Multiple Tests ===

You can run multiple tests at once:

  testjs examples/person_test.js examples/dommy_test.js --dom

== REQUIREMENTS ==

* johnson (github.com/jbarnette/johnson)
* colored (errtheblog.com/posts/34-a-ruby-rainbow)

== TODO ==

* Scrap the xUnit thing and go with a more spec-y approach

Copyright © 2008 Pat Nakajima
Something went wrong with that request. Please try again.