My last project used jsUnit, but after some searching around, i found a great alternative: jqUnit!
It is a simple wrapper around the jQuery testrunner, so it is possible to run it with any library. And it is jsUnit compatible, so you can reuse all old tests.
Other features:
- simple, just write test(‘it should find ids’,function(){ok(true)})
- very light syntax ok(value,msg), equal(actual,expected,msg)…
- DOM reset after every test
- clean output, that can be opened/closed by clicking test-names
- real user interaction ca be simulated with triggerEvent
Yes I like this library too. Very nice. There is also a jqMock to complement it.