You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests using ESModules are not recognized in Node 22.
Steps to reproduce
npm init nightwatch
Select default
? Select testing type to setup for your project End-to-End testing
? Select language + test runner variant JavaScript / default
? Select target browsers Chrome
? Enter source folder where test files are stored test
? Enter the base_url of the project http://localhost
? Select where to run Nightwatch tests On localhost
? Allow Nightwatch to collect completely anonymous usage metrics? Yes
? Setup testing on Mobile devices as well? No, skip for now
...
Nightwatch:
version: 3.11.0
changelog: https://github.com/nightwatchjs/nightwatch/releases/tag/v3.11.0
$ node --version
v22.13.1
$ npx nightwatch test/a.mjs
[Test/A] Test Suite
──────────────────────────────────────
ℹ Connected to ChromeDriver on port 9515 (771ms).
Using: chrome (133.0.6943.54) on MAC.
Wrote HTML report file to: /tmp/aa/tests_output/nightwatch-html-report/index.html
With node20, it's ok
$ node --version
v20.18.2
$ npx nightwatch test/a.mjs
[Test/A] Test Suite
──────────────────────────────────────
ℹ Connected to ChromeDriver on port 9515 (750ms).
Using: chrome (133.0.6943.54) on MAC.
Running a:
───────────────────────────────────────────────────────────────────────────────────────────────────
✔ Passed [ok]: true ok
✨ PASSED. 1 assertions. (3ms)
Wrote HTML report file to: /tmp/aa/tests_output/nightwatch-html-report/index.html
Description of the bug/issue
Tests using ESModules are not recognized in Node 22.
Steps to reproduce
npm init nightwatch
With node20, it's ok
$ node --version v20.18.2 $ npx nightwatch test/a.mjs [Test/A] Test Suite ────────────────────────────────────── ℹ Connected to ChromeDriver on port 9515 (750ms). Using: chrome (133.0.6943.54) on MAC. Running a: ─────────────────────────────────────────────────────────────────────────────────────────────────── ✔ Passed [ok]: true ok ✨ PASSED. 1 assertions. (3ms) Wrote HTML report file to: /tmp/aa/tests_output/nightwatch-html-report/index.html
Sample test
Command to run
Verbose Output
Nightwatch Configuration
Nightwatch.js Version
3.11.0
Node Version
v22.13.1
Browser
No response
Operating System
macOS 14.7.1
Additional Information
No response
The text was updated successfully, but these errors were encountered: