Utilities
Generating a spec file
Section titled “Generating a spec file”To save time, you can generate a spec file automatically from a feature file via the CLI:
npx @amiceli/vitest-cucumber --feature <path-to-feature> --spec <path-to-spec> --lang <en:optional>
Example:
npx @amiceli/vitest-cucumber --feature features/example.feature --spec src/__tests__/example.spec.ts
To parse a feature file in a different language, use the --lang option:
npx @amiceli/vitest-cucumber --feature features/example.feature --spec src/__tests__/example.spec.ts --lang fr
By default the feature file is parsed with en language.