Added unit tests for issue 36, cgevent.js