refactored karma to use a sinon stub instead of jquery