fix(assert): Add default name for no test name. #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of all I'm a big fan of tape! Thanks for that 😄
I just discovered playing around with a custom TAP reporter for COBOL, (yep COBOL 😅) that whenever a TAP report has no name after the test or the name has no space
faucet
fails to parse the line.For example given the following TAP as input:
or (without the space)
This is a fix that prevents the problem but maybe the
tap-parser
should be fixed instead. I tried to follow the ES5 syntax and already existing style but please feel free to let me know any code standard/style that you want me to follow, if you want to merge this PR.I was willing to add both scenarios as tests but looks like there is none 😅, quite ironic being a test output lib 😜
Can you confirm if there is any other implications about changing https://github.com/substack/faucet/blob/0fabf821eb142dc75a318c5cd408d7653279bb00/index.js#L38 looks like name is used in some other lines 😄
This are the proposed changes 👇
fix(assert): Add default name for no test name.
DEFAULT_TEST_NAME
.res.name
has a value or useDEFAULT_TEST_NAME
.