fix legacy mode event attach

typo
use mocha for testing

tapedeck doesn't work in older browsers which makes it impossible to
locally debug broken tests