Add event listerner, and use mocha to test