a working example of the travesty that is javascript unit testing