Only send output to testHistoryFormatter if there is one. Fixes #493.