Skip to content

Commit 285d1f3

Browse files
committed
browserstack.config
1 parent 40ebdcf commit 285d1f3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

index.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ commander
2222
.option('--test-timeout <ms>', 'Timeout value for each tests. (default: 30000)')
2323
.option('--output-directory <directory>', 'Write test results to files, format is defined by --output-format')
2424
.option('--output-format <@mochajs/json-file-reporter|xunit>', 'Format for the output file. (default: @mochajs/json-file-reporter)')
25+
.option('--browserstack.config <path>','path to browserstack config file, default to browserstack.yml')
2526

2627
commander.parse(process.argv);
2728
const options = commander.opts();
28-
2929
options.maxWorkers = options.maxWorkers ? options.maxWorkers : 1
3030
options.testTimeout = options.testTimeout ? options.testTimeout : 30000
3131
options.filter = options.filter ? options.filter : ''
3232
options.outputFormat = options.outputFormat ? options.outputFormat : '@mochajs/json-file-reporter'
33+
options.browserstackConfig = options['browserstack.config'] ? options['browserstack.config'] : 'browserstack.yml'
3334
options.buildFolderPath = '_generated'
3435

3536
var conf = {level: options.debug ? logger.DEBUG :logger.INFO};
@@ -88,8 +89,7 @@ for(const sideFileName of sideFiles)
8889
}
8990

9091
}
91-
92-
const testSuiteProcess = spawn.sync('npx', ['browserstack-node-sdk', 'mocha', '_generated', '--timeout', options.testTimeout,'-j', options.maxWorkers, '-g', options.filter], { stdio: 'inherit' });
92+
const testSuiteProcess = spawn.sync('npx', ['browserstack-node-sdk', 'mocha', '_generated', '--timeout', options.testTimeout,'-j', options.maxWorkers, '-g', options.filter, '--browserstack.config', options.browserstackConfig], { stdio: 'inherit' });
9393

9494
if(!options.debug)
9595
{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "git",
55
"url": "git+https://github.com/mattonem/browserstack-side-runner.git"
66
},
7-
"version": "2.0.0-beta.7",
7+
"version": "2.0.0-beta.8",
88
"main": "index.mjs",
99
"homepage": "https://github.com/mattonem/browserstack-side-runner#readme",
1010
"scripts": {

0 commit comments

Comments
 (0)