refactored test result formatting for arbitrary emit objects and lengths