QUnit: love it!

May 28th, 2008

If you were looking for a way to test js, and like me, found jsunit a bit too weird to use, go with QUnit. It’s easy to get started and easy to keep all tests organized. I plan to record a screencast on how to use it soon.

qunit1.png

Categories: General | Top Of Page | 2 Comments » |

2 Responses to “QUnit: love it!”

Julian Jelfs Says:

Annoyingly I’ve just been looking for something to unit test javascript and rejected jsUnit because it didn’t handle asynchronous stuff well. i.e. when a test function returned, the test was finished. I ended up writing my own mechanism which allows tests to announce when they have finished before their status is evaluated which allows me to easily test asynchronous javascript.

Do you know if/how well QUnit supports asynchronous tests?

hammett Says:

Julian, you can check the source at http://dev.jquery.com/view/trunk/qunit/testrunner.js

I dont think it has any sophisticate support for that, there are start/stop/synchronize methods that might be related to what you’re talking, but I can’t tell for sure.

Leave a Reply