🚀 Socket Launch Week 🚀 Day 1: Introducing .NET Support in Socket.Learn More

@wdio/runner

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wdio/runner - npm Package Compare versions

Comparing version

to
5.4.3

@@ -63,3 +63,7 @@ "use strict";

this.configParser.addConfigFile(configFile);
try {
this.configParser.addConfigFile(configFile);
} catch (e) {
return this._shutdown(1);
}
/**

@@ -69,2 +73,3 @@ * merge cli arguments into config

this.configParser.merge(argv);

@@ -180,4 +185,3 @@ /**

});
await this._shutdown(failures);
return failures;
return this._shutdown(failures);
}

@@ -256,3 +260,9 @@ /**

return Promise.all(logTypes.map(async logType => {
const logs = await global.browser.getLogs(logType);
let logs;
try {
logs = await global.browser.getLogs(logType);
} catch (e) {
return log.warn(`Couldn't fetch logs for ${logType}: ${e.message}`);
}
/**

@@ -262,2 +272,3 @@ * don't write to file if no logs were captured

if (logs.length === 0) {

@@ -279,2 +290,3 @@ return;

this.emit('exit', failures === 0 ? 0 : 1);
return failures;
}

@@ -311,3 +323,3 @@ /**

if (shutdown) {
await this._shutdown();
return this._shutdown();
}

@@ -314,0 +326,0 @@ }

@@ -60,14 +60,33 @@ "use strict";

for (let serviceName of config.services) {
let serviceConfig = config;
/**
* allow custom services that are already initialised
*/
if (typeof serviceName === 'object') {
log.debug(`initialise custom service "${serviceName}"`);
if (typeof serviceName === 'object' && !Array.isArray(serviceName)) {
log.debug('initialise custom initiated service');
initialisedServices.push(serviceName);
continue;
}
/**
* allow custom services with custom options
*/
log.debug(`initialise wdio service "${serviceName}"`);
if (Array.isArray(serviceName)) {
serviceConfig = (0, _deepmerge.default)(config, serviceName[1] || {});
serviceName = serviceName[0];
}
try {
/**
* allow custom service classes
*/
if (typeof serviceName === 'function') {
log.debug(`initialise custom service "${serviceName.name}"`);
initialisedServices.push(new serviceName(serviceConfig, caps));
continue;
}
log.debug(`initialise wdio service "${serviceName}"`);
const Service = (0, _config.initialisePlugin)(serviceName, 'service');

@@ -82,3 +101,3 @@ /**

initialisedServices.push(new Service(config, caps));
initialisedServices.push(new Service(serviceConfig, caps));
} catch (e) {

@@ -85,0 +104,0 @@ log.error(e);

{
"name": "@wdio/runner",
"version": "5.4.2",
"version": "5.4.3",
"description": "A WebdriverIO service that runs tests in arbitrary environments",

@@ -33,7 +33,7 @@ "author": "Christian Bromann <christian@saucelabs.com>",

"dependencies": {
"@wdio/config": "^5.4.2",
"@wdio/config": "^5.4.3",
"@wdio/logger": "^5.4.1",
"deepmerge": "^2.0.1",
"gaze": "^1.1.2",
"webdriverio": "^5.4.2"
"webdriverio": "^5.4.3"
},

@@ -43,3 +43,3 @@ "publishConfig": {

},
"gitHead": "f0341fd33304e28ab8d2827f64dfa9dad94b312d"
"gitHead": "f93cd341dcd7ba94ad961e821ab8687e0c21ccd1"
}