codeceptjs / codeceptjs/CodeceptJS

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

Abierto
#5,358 1 comentario 0 reacciones 0 asignados Ver en GitHub
stale
Lenguaje dominante
JavaScript
Estrellas
4.2k
Forks
757
Merge medio
2 d 9 h
PR fusionados (30 d)
16

Descripción

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).

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.