amiceli / vitest-cucumber

Use gherkin in your unit tests with vitest
https://vitest-cucumber.miceli.click
41 stars 5 forks source link

feat: add global configuration #137

Closed Odonno closed 1 month ago

Odonno commented 1 month ago

Note: The default excluded tag is @ignored instead of undefined (from other js test library) to mimic the behavior of SpecFlow (see https://docs.specflow.org/projects/specflow/en/latest/Gherkin/Gherkin-Reference.html#tags). This is more opinionated but IMO I find it better this way in order to avoid defining a default tag exclusion ourself...

Note 2: The current options pattern can be extended to host other variables in the future (e.g. indludedTags, loadRelativePath, etc...)

amiceli commented 1 month ago

Yes it's a good idea to allow global option and I'm ok for ignore.

amiceli commented 1 month ago

Also language can be added into default options. What do you think ? Currently we used it in parser src/parser/parser.ts.

Odonno commented 1 month ago

I made all the changes required @amiceli

amiceli commented 1 month ago

Thanks, everything is ok, I merge this PR. I will publish a new version with this feature and update vitest-cucumber docs.