cucumber / gherkin-utils

API for working with Gherkin documents
MIT License
11 stars 4 forks source link

Test java and javascript implementation against test/data/good #59

Open mpkorstanje opened 7 months ago

mpkorstanje commented 7 months ago

🤔 What's the problem you've observed?

The java implementation currently doesn't test itself against the examples in testdata/good.

✨ Do you have a proposal for making it better?

Copy the Javascript implementation

https://github.com/cucumber/gherkin-utils/blob/840e19f001c24bb6bed800e773a6e95ec2379663/javascript/test/prettyTest.ts#L243-L258

This can be done with JUnit 5's Parameterized tests. For example see:

https://github.com/cucumber/cucumber-expressions/blob/main/java/src/test/java/io/cucumber/cucumberexpressions/CucumberExpressionTest.java

mpkorstanje commented 7 months ago

See also the comments in https://github.com/cucumber/gherkin-utils/pull/53#issuecomment-1953241669.