-
-
Save tsh-code/db39941daacbb0db4fee31588b80dc04 to your computer and use it in GitHub Desktop.
Configure browser capabilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const browsersConfiguration = (config, commandArgs) => { | |
return async () => { | |
const browsersSettings = []; | |
const browserConfigs = getExtendedBrowsersConfigs(config, commandArgs); | |
const allSpecs = glob.sync(config.features.map(file => path.join(config.projectPath, file, '**/*.feature'))[0]); | |
const isParallel = | |
commandArgs.parallel !== undefined && Number.isInteger(commandArgs.parallel) && commandArgs.parallel !== 0; | |
const numberOfInstances = isParallel | |
? commandArgs.parallel >= allSpecs.length | |
? allSpecs.length | |
: commandArgs.parallel | |
: 1; | |
const expectedArrayLength = Math.ceil(allSpecs.length / numberOfInstances); | |
const chunkedSpecs = chunkSpecs(commandArgs, allSpecs, expectedArrayLength, numberOfInstances); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment