Fixing client side JS unit testing