codeceptjs / codeceptjs/CodeceptJS

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

Đang mở
#5,358 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
stale
Ngôn ngữ chính
JavaScript
Star
4.2k
Fork
757
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
16

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.