In the wdio.conf onPrepare
I am storing all my feature file's in a array.
let listOfFiles = fs.readdirSync(process.cwd() + '/features');
var featureFiles = [];
listOfFiles.map((file) => {
featureFiles.push(file)
});
Is it possible to use the featureFiles
array in another file?
I want to generate an list of feature files during execution and assign it to the variable "featureFiles" (which is declared but has no value to begin with). From what I've seen so far it's not possible to do this in wdio.conf as you will always get the value declared for your variable at the beginning.. which in my case is an empty array.