feat: add a default config

So that we can remove it from the default Karma config in karma/config.js.
refactor: use onExit rather than explicit emitter