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

Update keyword detection in TS #95

Closed
wants to merge 2 commits into from

Conversation

burn2delete
Copy link

@burn2delete burn2delete commented Sep 20, 2022

Update keyword detection to support And and But andStepDefinition

🤔 What's changed?

Fixes keyword detection in Typescript files

⚡️ What's your motivation?

Fixes #94

🏷️ What kind of change is this?

  • 🐛 Bug fix (non-breaking change which fixes a defect)

♻️ Anything particular you want feedback on?

n/a

📋 Checklist:

Update keyword detection to support And and But andStepDefinition
@aslakhellesoy
Copy link
Contributor

The And and But keywords that are valid in Gherkin are not exposed in Cucumber's TypeScript API. Until recently, they were incorrectly exposed in cypress-cucumber-preprocessor (which I assume you are using), but this has been removed in 13.0.0

More details in badeball/cypress-cucumber-preprocessor#821

Thanks for your contribution, but we won't be adding this since using And and But in step definitions is discouraged and not even supported in Cucumber and the latest cypress-cucumber-preprocessor.

@burn2delete
Copy link
Author

Is the intention that this plugin only be used with official cucumber libraries or provide matching for the gherkin language?

I'm using jest-cucumber which provides methods (even if just syntactic sugar) for the whole gherkin vocabulary including And/But. In jest having contextual tests makes sense since they are defined in a context with other tests.

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.

Issue with And/But detection in TypeScript
2 participants