scottcorgan / tap-out

A different tap parser
MIT License
23 stars 28 forks source link

emit fail when no fail diagnostics #28

Closed matthewdunsdon closed 6 years ago

matthewdunsdon commented 7 years ago

The fail event should be emitted when an assertion failed, regardless of whether the failed assertion in the tap output contains diagnostic data or not.

Description

Updated line error handling to ensure that fail event is also emitted when no failure diagnostics provided.

1..4
# is true
ok 1 - Input file opened
not ok 2 - First line of the input valid
ok 3 - Read the rest of the file
not ok 4 - Summarized correctly

Motivation and Context

I was looking into the root cause of a GH issue reported in tap-teamcity. This library expects the "fail" event to be emitted on an assertion fail, but when tap does no provide any failure diagnostics this event is not present.

How Was This Tested?

Updated unit tests and tested output with the tap output above.

Types of changes

Checklist:

matthewdunsdon commented 7 years ago

@scottcorgan Would you be able to take a look into this PR?

I am will to discuss this more if you like.