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.
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.
Let's assume we have
codecept.conf.jsconfig file in the project root with the following config:When running tests with:
all specified feature files are executed as expected.
However, when the
-cCLI option is explicitly provided:the command fails to identify and run the specified glob for the feature files, resulting in 0 features being picked.
Root cause:
The issue occurs due to the usage of
path.resolveon paths when a custom configuration file is specified here. This results in invalid input for theglobSynccommand, causing it to fail to resolve the glob patterns correctly here.