[test-fix] Refactoring and adding more tests, also allowing lazyloading of primus-emitter