Tags
Ignore Rule / Scenario with Gherkin tags
describeFeature
allows optional options to ignore Scenario
, Scenario Outline
, Rule
according to a tag.
Feature: detect uncalled rules @awesome Scenario: Me I am executed Given vitest-cucumber is running Then I am executed @another-tag Rule: executed rule Scenario: I am also executed Given vitest-cucumber is running Then my parent rule is called @custom Scenario: Ignored scenario Given vitest-cucumber is running Then I am ignored
Here is an example to ignore the Rule by exluding the tag @another-tag
:
describeFeature(feature, () => { // ...}, { excludeTags : ['another-tag']}) // you can use as many tags as you want
This will ignore Rule
and its Scenario
/ Scenario Outline
.
Nesting tags filtering
Since 3.10.0
vitest-cucumber allows to use nested tags with includeTags
, excludeTags
in describeFeature
or configuration.
Example:
describeFeature(feature, () => { // ...}, { excludeTags : [ ["alpha", "beta"], "vitests", "another" ]})
It will exclude Rule
, Scenario
etc with (@alpha
and @beta
) tags or @vitests
or @another
tag.