Use standard ECMAScript syntax to import modules
Environment
NodeJS 13.10 and above, as the ESM syntax officially landed without needing any flag, and the way to import follows the ECMAScript standard, which doesn't allow missing file extensions (.js
, .mjs
, or .cjs
).
How to reproduce
- Use latest stable version of NodeJS
-
npm run test
...
Observed behavior
The test_runner.mjs
file is incapable of importing ./test/runners/chromium_remote_process
and others, as the file extension is missing
Expected behavior
The test_runner.mjs
should use standard ECMAScript syntax to import local files, which mandatory requires a fully qualified path, including the extension.
Edited by Manish Jethani