Skip to content

Merge updates into master#6

Open
mayorbyrne wants to merge 3 commits intocoreybutler:masterfrom
mayorbyrne:updates
Open

Merge updates into master#6
mayorbyrne wants to merge 3 commits intocoreybutler:masterfrom
mayorbyrne:updates

Conversation

@mayorbyrne
Copy link
Copy Markdown
Collaborator

Was just playing around and re-familiarizing myself with the library, doing some unit testing, and realized if you pass nothing into .pass() or .fail() there was a trailing - logged. This PR attempts to fix this. No worries if this is garbage and gets rejected.

@mayorbyrne mayorbyrne requested a review from coreybutler July 16, 2023 04:25
@coreybutler
Copy link
Copy Markdown
Owner

coreybutler commented Jan 2, 2024

I'm finally getting around to this. Is there really a trailing -? The - is part of the TAP spec, so I'm assuming use of pass() or fail() with no parameter is interpreting this as an empty string.

I think something should be done about this, but instead of eliminating the dash, perhaps it would be better to have a default message like pass or fail. This way the output is clear. If someone sees a generic pass/fail message, it should be an indicator they need to specify a more specific message (i.e. prompt them to add a parameter to pass() or fail()).

In other words, this line pass (msg = '', directive = null) { would change to pass (msg = 'pass', directive = null) { and the fail function would do the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants