Skip to content

Conversation

@davidjgoss
Copy link
Contributor

@davidjgoss davidjgoss commented Nov 25, 2025

🤔 What's changed?

Change the shape of what AssembledStep.prepare returns, to include the untouched function, expression args, data table and doc string.

This puts more onus on the consumer to handle the returned stuff, but also gives it more control over what is done with arguments, while still providing a single object type for all test steps.

⚡️ What's your motivation?

Some example use cases:

  • Providing a different this value to the parameter type transformer vs the step function (we have this with cucumber-node right now)
  • Providing their own version of a data table
  • Providing a structured representation of a doc string

🏷️ What kind of change is this?

  • 💥 Breaking change (incompatible changes to the API)

📋 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.

@davidjgoss davidjgoss marked this pull request as ready for review November 25, 2025 13:46
@davidjgoss davidjgoss merged commit aaac0f1 into main Nov 25, 2025
11 checks passed
@davidjgoss davidjgoss deleted the prepare-rework branch November 25, 2025 18:02
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.

1 participant