File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -7,18 +7,27 @@ const { execFileSync } = require("child_process");
77
88const { shouldProceedCurrentStep } = require ( "./lib/tagsHelper" ) ;
99
10+ const debug = ( message , ...rest ) =>
11+ process . env . DEBUG
12+ ? console . log ( `DEBUG: ${ message } ` , rest . length ? rest : "" )
13+ : null ;
14+
1015// TODO currently we only work with feature files in cypress/integration folder.
1116// It should be easy to base this on the cypress.json configuration - we are happy to take a PR
1217// here if you need this functionality!
18+ const defaultGlob = "cypress/integration/**/*.feature" ;
1319
14- const paths = glob . sync ( "cypress/integration/**/*.feature" ) ;
20+ const specArg = process . argv . slice ( 2 ) . find ( arg => arg . indexOf ( "GLOB=" ) === 0 ) ;
1521
16- const featuresToRun = [ ] ;
22+ const specGlob = specArg ? specArg . replace ( / . * = / , "" ) : defaultGlob ;
1723
18- const debug = ( message , ...rest ) =>
19- process . env . DEBUG
20- ? console . log ( `DEBUG: ${ message } ` , rest . length ? rest : "" )
21- : null ;
24+ if ( specArg ) {
25+ debug ( "Found glob" , specGlob ) ;
26+ }
27+
28+ const paths = glob . sync ( specGlob ) ;
29+
30+ const featuresToRun = [ ] ;
2231
2332const found = process . argv . slice ( 2 ) . find ( arg => arg . indexOf ( "TAGS=" ) === 0 ) ;
2433
You can’t perform that action at this time.
0 commit comments