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

未关闭 适合新手
#5,358 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
冷清
领域
cli, testing-qa

调研方向

从 lib/command/run-multiple.js 中处理自定义配置路径的部分开始,然后跟踪生成的路径如何到达 lib/codecept.js 和 globSync。重现 issue 中的两个 run-multiple 命令,并验证显式传入 -c codecept.conf.js 后能够发现并运行已配置的 feature 文件。

由索引模型根据 Issue 内容生成。

描述

stale

Let's assume we have codecept.conf.js config file in the project root with the following config:

exports.config = {
    // other options go here
    multiple: {
        basic: {
            browsers: ['chromium', 'firefox'],
        },
    },
    gherkin: {
        features: './features/*.feature',
        steps: ['./step_definitions/steps.js'],
    }
};

When running tests with:

codeceptjs run-multiple --all

all specified feature files are executed as expected.

However, when the -c CLI option is explicitly provided:

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. This results in invalid input for the globSync command, causing it to fail to resolve the glob patterns correctly here.

主要语言
JavaScript
星标
4.2k
派生
756
平均合并
2 天 9 小时
30 天内合并 PR
16

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

codeceptjs/CodeceptJS 的其他 Issue

查看 codeceptjs/CodeceptJS 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。