added basic tests for register.js and events.js