cucumber / cucumber-expressions

Human friendly alternative to Regular Expressions
MIT License
148 stars 51 forks source link

RegEx "expressions" and defineParameterType feature file examples ? #212

Open chrisribe opened 1 year ago

chrisribe commented 1 year ago

🤔 What's the problem you're trying to solve?

I have been looking over the cucumber git repo for regex "expressions" (javascript) defineParameterType seems interesting but I do not see any simple usage examples only unit test cases. https://github.com/cucumber/cucumber-expressions/tree/5af7076298a9c2b5455e63f1c0de90ddc9f1c1a4#javascript--typescript

✨ What's your proposed solution?

The entire ParameterTypeRegistry + defineParameterType seems a bit complex when you explore it. Showing off how to use it in a feature file would help adoption/integration. https://github.com/cucumber/cucumber-expressions/blob/c1915d94810615b317e8f59bd3dfd6e6511c3336/javascript/src/ParameterTypeRegistry.ts#L50

⛏ Have you considered any alternatives or workarounds?

I am currently using Regex strings directly in the feature file step definitions. I was looking here to find better ways of doing things.

📚 Any additional context?

None

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