vitest-cucumber
Présentation Installation Configuration Gherkin Scenario Scenario Outline Background Rule Hooks Gherkin tags Async steps and sequentially Steps with expressions DocStrings DataTables Spoken languages Upcoming

vitest-cucumber

Ignore Rule / Scenario with Gherkin tags

describeFeature allow optionnal options to ignore Scenario, Scenario Outline, Rule according a tag.

Gherkin example :

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

An example, ignore Rule with @another-tag :

describeFeature(feautre, () => {
    // ...
}, { excludeTags : ['another-tag']}) // you can use many tags

This will ignore Rule and its Scenario / Scenario Outline.