Skip to content

Commit b0df2e2

Browse files
authored
chore: remove wdio v5 leftover (#3587)
1 parent da04914 commit b0df2e2

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

lib/plugin/wdio.js

+4-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
const debug = require('debug')('codeceptjs:plugin:wdio');
2-
const path = require('path');
3-
const fs = require('fs');
42

53
const container = require('../container');
64
const mainConfig = require('../config');
@@ -100,21 +98,15 @@ module.exports = (config) => {
10098
const launchers = [];
10199

102100
for (const name of config.services) {
103-
// webdriverio v5 style
104101
const Service = safeRequire(`@wdio/${name.toLowerCase()}-service`);
105102
if (Service) {
106103
if (Service.launcher && typeof Service.launcher === 'function') {
107104
const Launcher = Service.launcher;
108105

109-
const version = JSON.parse(fs.readFileSync(path.join(require.resolve('webdriverio'), '/../../', 'package.json')).toString()).version;
110-
if (version.indexOf('5') === 0) {
111-
launchers.push(new Launcher(config));
112-
} else {
113-
const options = {
114-
logPath: global.output_dir, installArgs: seleniumInstallArgs, args: seleniumArgs, ...wdioOptions,
115-
};
116-
launchers.push(new Launcher(options, [config.capabilities], config));
117-
}
106+
const options = {
107+
logPath: global.output_dir, installArgs: seleniumInstallArgs, args: seleniumArgs, ...wdioOptions,
108+
};
109+
launchers.push(new Launcher(options, [config.capabilities], config));
118110
}
119111
if (typeof Service === 'function') {
120112
services.push(new Service(config, config.capabilities));

0 commit comments

Comments
 (0)