Log unexpected errors in unit tests