Really useful software project management and source code hosting.    tell me more...
BROWSE: projects / users / groups
Just a base javascript library to group some functionality. It makes heavily use of jQuery
star_disabled Dashboard Source Tickets Wiki Blog Network


Really Useful Social coding!

Codaset is an open system, so you can browse and search through all the open source projects, and check out what your friends are coding. Follow them, befriend them, and fork their code; quickly and easily.
Every single open source project you create is free, so come on and use Codaset at no cost. Your first private or semi-private project is also free. Read more about what it costs after that.
posted by Tom Van Herreweghe
9 months ago

Unit tests for the library


So far, the unit testing framework is set up, and the base class has a 100% coverage. The Core and Pubsub plugin still have 0% coverage, but that will be "solved" in the course of next week.

As a unit testing framework, I have chosen to use QUnit. It's created by John Resig, the creator of jQuery. One of the main advantages of this unit testing framework, is that it is easy to set up and use. On the downside, it does not have the same syntax as you would expect from an xUnit library. For this reason, I have looked a bit further, and came upon "JsUnit". This library belongs to the xUnit family and as such doesn't require me to learn a new syntax.

It is possible that in the future I will switch the unit testing framework from QUnit to JsUnit, just for the sake of syntax. But first however, I'd like to have 100% coverage of the source in QUnit. Already some bugs have been found and solved in the base class. Some things only come out while using the library. That's why unit tests are a requirement: to find bugs before someone uses the library in production.

That being said, if you do find a bug, please do the following steps to report it:

  • Report the bug in a ticket
  • Provide steps to reproduce the bug

If you would also like to solve the bug, then you can:

  • Fork the code
  • Create a unit test to reproduce the bug
  • Fix the bug
  • Create a patch for it via git diff
  • Ensure that all unit tests still work

I don't know if it is possible to attach a patch in the ticket. You can always mail it to tom [at] theanalogguy [dot] be Please specify the ticket number in your e-mail.

All help is much appreciated.


please let us know who you are

or better still, login here or sign up...



Latest blog posts...


  • Unit tests for the library