@wdio/config 8.32.2 → 8.32.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -225,7 +225,7 @@ export default class ConfigParser {
225
225
  * attributes from CLI, config and capabilities
226
226
  */
227
227
  getSpecs(capSpecs, capExclude) {
228
- const isSpecParamPassed = Array.isArray(this._config.spec) && this._config.spec.length >= 1;
228
+ const isSpecParamPassed = Array.isArray(this._config.spec) && this._config.spec.length > 0;
229
229
  const multiRun = this._config.multiRun;
230
230
  // when CLI --spec is explicitly specified, this._config.specs contains the filtered
231
231
  // specs matching the passed pattern else the specs defined inside the config are returned
@@ -263,11 +263,11 @@ export default class ConfigParser {
263
263
  }
264
264
  // Remove any duplicate tests from the final specs array
265
265
  specs = [...new Set(specs)];
266
- // If the --multi-run flag is set, duplicate the specs array
267
- // Ensure that when --multi-run is set that either --spec or --suite is also set
266
+ // If the --multi-run flag is set, duplicate the specs array N times
267
+ // Ensure that when --multi-run is used that either --spec or --suite is also used
268
268
  const hasSubsetOfSpecsDefined = isSpecParamPassed || suites.length > 0;
269
269
  if (multiRun && hasSubsetOfSpecsDefined) {
270
- specs = specs.flatMap(i => Array.from({ length: multiRun }).fill(i));
270
+ specs = Array.from({ length: multiRun }, () => specs).flat();
271
271
  }
272
272
  else if (multiRun && !hasSubsetOfSpecsDefined) {
273
273
  throw new Error('The --multi-run flag requires that either the --spec or --suite flag is also set');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/config",
3
- "version": "8.32.2",
3
+ "version": "8.32.4",
4
4
  "description": "A helper utility to parse and validate WebdriverIO options",
5
5
  "author": "Christian Bromann <mail@bromann.dev>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-config",
@@ -37,8 +37,8 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@wdio/logger": "8.28.0",
40
- "@wdio/types": "8.32.2",
41
- "@wdio/utils": "8.32.2",
40
+ "@wdio/types": "8.32.4",
41
+ "@wdio/utils": "8.32.4",
42
42
  "decamelize": "^6.0.0",
43
43
  "deepmerge-ts": "^5.0.0",
44
44
  "glob": "^10.2.2",
@@ -51,5 +51,5 @@
51
51
  "minimatch": "^9.0.0",
52
52
  "tsconfig-paths": "^4.1.0"
53
53
  },
54
- "gitHead": "dd4ccd4bcbca4b5f97af81fc6ccee11cb8859654"
54
+ "gitHead": "f8d2d051d1331f4c24521a3c3b0e830ff3e45282"
55
55
  }