Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step failure output mangled #66

Closed
sblundy opened this issue Feb 9, 2020 · 0 comments · Fixed by #67
Closed

Step failure output mangled #66

sblundy opened this issue Feb 9, 2020 · 0 comments · Fixed by #67
Labels
bug Something isn't working

Comments

@sblundy
Copy link
Contributor

sblundy commented Feb 9, 2020

Describe the bug

If a step fails because the step function returned an error, the output is mangled with fmt.SPrintf() error output.

For example, say the step is And 2 items posted. If the function returns fmt.Errorf("expected %d items, received %d", n, actual), then the output would be

gobdd.go:377: And %!(EXTRA string=2 items posted, *errors.errorString=expected 2 items posted, received 0)

Expected behavior

Prints out the step and the error clearly formatted. Something like:

gobdd.go:377: And 2 items posted: expected 2 items posted, received 0

@sblundy sblundy added the bug Something isn't working label Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant