gherkin-lint-ts
Version:
Gherkin features linter written in Typescript
21 lines • 759 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.run = exports.name = void 0;
exports.name = "no-unnamed-scenarios";
function run(feature) {
var _a;
const errors = [];
(_a = feature === null || feature === void 0 ? void 0 : feature.children) === null || _a === void 0 ? void 0 : _a.forEach(child => {
var _a;
if (child.scenario && !child.scenario.name) {
errors.push({
message: "Missing Scenario name",
rule: exports.name,
line: ((_a = child.scenario.location) === null || _a === void 0 ? void 0 : _a.line) || 0,
});
}
});
return errors;
}
exports.run = run;
//# sourceMappingURL=no-unnamed-scenarios.js.map