-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nightwatch force importing cucumber files in CJS even if Cucumber is configured to use ESM #3805
Comments
This method from https://github.com/nightwatchjs/nightwatch/blob/e7fde68bdf6dd43e9a1c7bcd38263f54dd287bda/lib/runner/test-runners/cucumber.js#L109C1-L109C1 createInitialRequires() {
const initialRequires = [
'--require', CucumberSuite.cucumberSetupFile
];
initialRequires.push(...this.buildArgvValue(['require', 'require-module']));
return this.allModulePaths.reduce((prev, spec) => {
prev.push('--require', spec);
return prev;
}, initialRequires);
} should use |
Current workaround is using programmatical API but this prevents the use of new nightwatch inspector feature and other stuff coming from nightwatch runners :( |
Same issue here ! |
thermsdorff
added a commit
to thermsdorff/nightwatch
that referenced
this issue
Jul 12, 2023
2 tasks
AutomatedTester
pushed a commit
that referenced
this issue
Jul 18, 2023
yashPratp983
pushed a commit
to yashPratp983/nightwatch
that referenced
this issue
Jul 25, 2023
…chjs#3806) * fix(cucumber-runner): allow esm imports (nightwatchjs#3805) * fix(cucumber-runner): add cli-arg 'enable-esm' * test(cucumber-runner): add tests for enable esm options/cli arg
yashPratp983
pushed a commit
to yashPratp983/nightwatch
that referenced
this issue
Jul 25, 2023
…chjs#3806) * fix(cucumber-runner): allow esm imports (nightwatchjs#3805) * fix(cucumber-runner): add cli-arg 'enable-esm' * test(cucumber-runner): add tests for enable esm options/cli arg
yashPratp983
pushed a commit
to yashPratp983/nightwatch
that referenced
this issue
Jul 25, 2023
…chjs#3806) * fix(cucumber-runner): allow esm imports (nightwatchjs#3805) * fix(cucumber-runner): add cli-arg 'enable-esm' * test(cucumber-runner): add tests for enable esm options/cli arg
yashPratp983
pushed a commit
to yashPratp983/nightwatch
that referenced
this issue
Jul 25, 2023
…chjs#3806) * fix(cucumber-runner): allow esm imports (nightwatchjs#3805) * fix(cucumber-runner): add cli-arg 'enable-esm' * test(cucumber-runner): add tests for enable esm options/cli arg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the bug/issue
When I try to run tests through native Cucumber runner, i expect nightwatch to import modules regarding cucumber's modules importation configuration (commonJS or ESM)
Context
All my source code is using ESM, Cucumber is configured to use ESM, nightwatch config is using CJS
Cucumber configuration
Steps to reproduce
Sample test
No response
Command to run
Verbose Output
No response
Nightwatch Configuration
Nightwatch.js Version
3.0.1
Node Version
18.16.0
Browser
No response
Operating System
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: