Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise((resolve, reject) => {
$.util.log($.util.colors.blue(`Launching WebdriverIO for ${browsers[j]}...`));
$.util.log($.util.colors.blue(specs));
const wdio = new WebdriverIOLauncher('core/test/e2e-webdriverio/wdio.conf.js');
wdio.run()
.then(
function (exitCode) {
const exitMessage = `WebdriverIO has exited with ${exitCode}`;
switch (exitCode) {
case 0: // success
$.util.log($.util.colors.green(exitMessage));
$.util.log($.util.colors.green('Passed E2E tests successfully.'));
break;
default: // error
$.util.log($.util.colors.red(exitMessage));
$.util.log($.util.colors.red('Failed to pass some E2E tests. (Otherwise, the E2E testing itself is broken)'));
testsPassed = false;
}
resolve();