correct number of errors in xunit report

I found it reports `errors="1"` out of test report even the test passed without failures. Then I found the root cause is `"".split("\n").length === 1` which means it count one even when test output is empty.