Skip to content

Commit 91626b2

Browse files
SaranshBSfrancisf
authored andcommitted
adding default cap
1 parent 1ddc23f commit 91626b2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/launcher.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ export default class BrowserstackLauncherService implements Services.ServiceInst
2626
}
2727

2828
onPrepare (config?: Options.Testrunner, capabilities?: Capabilities.RemoteCapabilities) {
29+
if (Array.isArray(capabilities)) {
30+
capabilities.forEach((capability: Capabilities.DesiredCapabilities | any) => {
31+
const wdioServiceVersion = process.env.npm_package_version;
32+
if (capability['bstack:options']) {
33+
capability['bstack:options'].wdioService = wdioServiceVersion;
34+
} else {
35+
capability['browserstack.wdioService'] = wdioServiceVersion;
36+
}
37+
})
38+
}
2939
if (!this._options.browserstackLocal) {
3040
return log.info('browserstackLocal is not enabled - skipping...')
3141
}

0 commit comments

Comments
 (0)