UNPKG

@amiceli/vitest-cucumber

Version:

vitest tools to use Gherkin feature in unit tests

32 lines (31 loc) 777 B
export var StepTypes; (function (StepTypes) { StepTypes["THEN"] = "Then"; StepTypes["AND"] = "And"; StepTypes["WHEN"] = "When"; StepTypes["GIVEN"] = "Given"; StepTypes["BUT"] = "But"; })(StepTypes || (StepTypes = {})); export class Step { type; details; docStrings = null; isCalled; dataTables = []; title; constructor(type, details, title) { this.details = details; this.type = type; this.isCalled = false; this.title = title || `${type}`; } getTitle() { return `${this.title} ${this.details}`; } setDocStrings(docStrings) { this.docStrings = docStrings; } matchStep(step) { return this.type === step.type && this.details === step.details; } }