Skip to content

Commit 1e0ff7e

Browse files
vladonemolgandecki
authored andcommitted
fix(tags): allow empty feature files
Fixes #239
1 parent df8066a commit 1e0ff7e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cypress-tags.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
const { Parser } = require("gherkin");
44
const glob = require("glob");
5-
const path = require("path");
65
const fs = require("fs");
76
const { execFileSync } = require("child_process");
87

@@ -41,7 +40,7 @@ let usingCypressConf = true;
4140
try {
4241
// TODO : curently we don't allow the override of the cypress.json path
4342
// maybe we can set this path in the plugin conf (package.json : "cypressConf": "test/cypress.json")
44-
const cypressConf = JSON.parse(fs.readFileSync(path.resolve("cypress.json")));
43+
const cypressConf = require("../../cypress.json");
4544
const integrationFolder =
4645
cypressConf && cypressConf.integrationFolder
4746
? cypressConf.integrationFolder.replace(/\/$/, "")
@@ -56,7 +55,8 @@ try {
5655
? cypressConf.testFiles.split(",")
5756
: cypressConf.testFiles;
5857
testFiles = testFiles.map(pattern => `${integrationFolder}/${pattern}`);
59-
defaultGlob = `{${testFiles.join(",")}}`;
58+
defaultGlob =
59+
testFiles.length > 1 ? `{${testFiles.join(",")}}` : testFiles[0];
6060
} else {
6161
defaultGlob = `${integrationFolder}/**/*.feature`;
6262
}

0 commit comments

Comments
 (0)