1.0.10 ⢠Published 8 months ago
custom-gherkin-utils v1.0.10
Custom Gherkin Utils š„
š Custom Gherkin Utils is a utility for processing Gherkin feature files, designed to:
- Split feature files into multiple files when they contain multiple
Scenario Outlines - Convert
Scenario OutlinesintoScenariosby replacing example placeholders- Preserve all Gherkin capabilities
š Features
āļø Converts Scenario Outline to Scenario
āļø Replaces <placeholders> with Example values
āļø Preserves Feature and Scenario Tags
āļø Keeps Background steps intact
āļø Maintains Data Tables (| column | value |)
āļø Preserves Doc Strings (""" text """)
āļø Handles Rule: blocks properly
āļø Removes Examples: after conversion
āļø Includes Jest tests for validation
š§ Usage
import { processFeatureFiles, performSetup } from "custom-gherkin-utils";
async function run() {
await performSetup({cleanTmpSpecDirectory: true, sourceSpecDirectory:'./samplefiles',tmpSpecDirectory:'./tmp', tagExpression: '@ruleTag3' }); // Split feature files in to individual ones
await processFeatureFiles("./features/**/*.feature"); // Convert scenario outlines to scenario by replacing place holders
}
run();