gherkin-lint-ts
Version:
Gherkin features linter written in Typescript
21 lines • 804 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.run = exports.name = void 0;
exports.name = "no-files-without-scenarios";
function run(feature) {
var _a;
if (!feature) {
return [];
}
const errors = [];
if (!((_a = feature.children) === null || _a === void 0 ? void 0 : _a.some(child => { var _a, _b; return child.scenario || ((_b = (_a = child.rule) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b.some(ruleChild => ruleChild.scenario)); }))) {
errors.push({
message: "Feature file does not have any Scenarios",
rule: exports.name,
line: 1,
});
}
return errors;
}
exports.run = run;
//# sourceMappingURL=no-files-without-scenarios.js.map