Skip to content

Commit 8a6ce42

Browse files
committed
configurable max workers
1 parent 1ac8cdb commit 8a6ce42

File tree

1 file changed

+4
-2
lines changed
  • packages/selenium-side-runner/src

1 file changed

+4
-2
lines changed

packages/selenium-side-runner/src/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ program
3535
.version(metadata.version)
3636
.option("-c, --capabilities [list]", "Webdriver capabilities")
3737
.option("-s, --server [url]", "Webdriver remote server")
38-
.option("-f, --filter [String]", "Filter test cases by name")
38+
.option("-f, --filter [string]", "Filter test cases by name")
39+
.option("-w, --maxWorkers [number]", "Maximum amount of workers that will run your tests, defaults to number of cores")
3940
.option("--no-sideyml", "Disabled the use of .side.yml")
4041
.option("--debug", "Print debug logs")
4142
.parse(process.argv);
@@ -95,7 +96,8 @@ function runProject(project) {
9596
"--testEnvironment", "node",
9697
"--modulePaths", path.join(__dirname, "../node_modules"),
9798
"--testMatch", "**/*.test.js"
98-
].concat(program.filter ? ["-t", program.filter] : []), { stdio: "inherit" });
99+
].concat(program.filter ? ["-t", program.filter] : [])
100+
.concat(program.maxWorkers ? ["-w", program.maxWorkers] : []), { stdio: "inherit" });
99101

100102
child.on("exit", (code) => {
101103
console.log("");

0 commit comments

Comments
 (0)