Contents

Paths

@spawn

Background:

  • Given a file named "features/a.feature" with:
    gherkin
    Feature: Feature A
      Scenario: Scenario A
        Given a passing step
  • And a file named "features/b.feature" with:
    gherkin
    Feature: Feature B
      Scenario: Scenario B
        Given a passing step
  • And a file named "features/step_definitions/steps.js" with:
    ruby
    const {Given} = require('@cucumber/cucumber')
    Given('a passing step', function() {})

Scenario: paths merged when supplied in both config and CLI

  • Given a file named "cucumber.json" with:
    json
    { "default": { "paths": ["features/**/*.feature"] } }
  • When I run cucumber-js with `features/a.feature`
  • Then it runs 2 scenarios
  • And the error output contains the text:
    text
    You have specified paths in both your configuration file and as CLI arguments

Source: features/paths.feature at commit 3ac6ecda, Cucumber Js (MIT license).