codeceptjs / codeceptjs/CodeceptJS

`run-multiple` command picks 0 feature files when `-c` CLI option is specified

Offen
#5,358 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
stale
Vorherrschende Sprache
JavaScript
Sterne
4.2k
Forks
757
Ø Merge
2 T. 9 Std.
Gemergte PRs (30 T.)
16

Beschreibung

Let's assume we have `codecept.conf.js` config file in the project root with the following config:
```js
exports.config = {
// other options go here
multiple: {
basic: {
browsers: ['chromium', 'firefox'],
},
},
gherkin: {
features: './features/*.feature',
steps: ['./step_definitions/steps.js'],
}
};
```
When running tests with:
```bash
codeceptjs run-multiple --all
```
all specified feature files are executed as expected.

However, when the `-c` CLI option is explicitly provided:
```bash
codeceptjs run-multiple --all -c codecept.conf.js
```
the command fails to identify and run the specified glob for the feature files, resulting in 0 features being picked.

Image

**Root cause:**

The issue occurs due to the usage of `path.resolve` on paths when a custom configuration file is specified [here](https://github.com/codeceptjs/CodeceptJS/blob/3.x/lib/command/run-multiple.js#L74). This results in invalid input for the `globSync` command, causing it to fail to resolve the glob patterns correctly [here](https://github.com/codeceptjs/CodeceptJS/blob/3.x/lib/codecept.js#L175).

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.