Skip to content

Commit 36c2091

Browse files
vladonemolgandecki
authored andcommitted
fix(tags): allow empty feature files
Fixes #239
1 parent 647592b commit 36c2091

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cypress-tags.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ paths.forEach(featurePath => {
3838
const spec = `${fs.readFileSync(featurePath)}`;
3939
const parsedFeature = new Parser().parse(spec);
4040

41+
if (!parsedFeature.feature) {
42+
debug(`Feature: ${featurePath} is empty`);
43+
return;
44+
}
45+
4146
const featureTags = parsedFeature.feature.tags;
4247
const featureShouldRun = shouldProceedCurrentStep(featureTags, envTags);
4348
const taggedScenarioShouldRun = parsedFeature.feature.children.some(

0 commit comments

Comments
 (0)