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

Add details to "step is undefined" error #669

Merged
merged 2 commits into from
Dec 10, 2024
Merged

Add details to "step is undefined" error #669

merged 2 commits into from
Dec 10, 2024

Conversation

vearutop
Copy link
Member

@vearutop vearutop commented Dec 10, 2024

🤔 What's changed?

Step text is added to the wrapped error and can help to identify the problematic step.

=== RUN   TestAPISuiteRun/Foo
    suite.go:634: step is undefined: I should have "foo" responssssse with body

⚡️ What's your motivation?

Currently, the error returned for an undefined step lacks details and relies on formatter context to be actionable

=== RUN   TestAPISuiteRun/Foo
    suite.go:634: step is undefined

This makes it hard to understand which exact step is the issue.

🏷️ What kind of change is this?

  • ⚡ New feature (non-breaking change which adds new behaviour)

♻️ Anything particular you want feedback on?

No.

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

Copy link

Go API Changes

# github.com/cucumber/godog/formatters
## compatible changes
FlushFormatter: added

# summary
Inferred base version: v0.15.0
Suggested version: v0.16.0

@vearutop vearutop marked this pull request as ready for review December 10, 2024 14:32
Copy link

@ahmedaabouzied ahmedaabouzied left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vearutop vearutop merged commit e55eab6 into main Dec 10, 2024
5 checks passed
@vearutop vearutop deleted the undefined-details branch December 10, 2024 15:54
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