-
Notifications
You must be signed in to change notification settings - Fork 781
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
ERR_UNSUPPORTED_ESM_URL_SCHEME error while running qunit test in cli (nodejs) mode #1667
Labels
Comments
The |
@Mugen87 Thanks, I'll get this fixed and released shortly. |
Krinkle
added a commit
that referenced
this issue
Feb 15, 2022
* For subprocesses in the CLI tests, use `process.execPath` to use the same node program for subprocesses; regardless of its name, extension or location (e.g. '`odejs` or `node.exe` etc.) * Use `node bin/qunit.js` instead of `bin/qunit.js` in package.json, because the hashbang (`#!/usr/bin/env`) atop the executable is not supported on Windows. * Avoid a problem with quoted arguments in the test runner's creation of sub processes. Instead of going through a shell (and thus cross-platform differences), pass arguments explicitly using Node's built-in mechanism for child processes. I've removed the `exaca` dependency in the process and just the Node.js API directly. * Improve output normalization to accomodate Windows' backslashes. * Skip a handful of tests that don't yet pass, let's make iterative progress going-forward to avoid further regressions. Ref #1667. Closes #1359.
Krinkle
added a commit
that referenced
this issue
Feb 15, 2022
* For subprocesses in the CLI tests, use `process.execPath` to use the same node program for subprocesses; regardless of its name, extension or location (e.g. '`odejs` or `node.exe` etc.) * Use `node bin/qunit.js` instead of `bin/qunit.js` in package.json, because the hashbang (`#!/usr/bin/env`) atop the executable is not supported on Windows. * Avoid a problem with quoted arguments in the test runner's creation of sub processes. Instead of going through a shell (and thus cross-platform differences), pass arguments explicitly using Node's built-in mechanism for child processes. I've removed the `exaca` dependency in the process and just the Node.js API directly. * Improve output normalization to accomodate Windows' backslashes. * Skip a handful of tests that don't yet pass, let's make iterative progress going-forward to avoid further regressions. Ref #1667. Closes #1359.
Krinkle
added a commit
that referenced
this issue
Feb 15, 2022
Krinkle
added a commit
that referenced
this issue
Feb 15, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tell us about your runtime:
What are you trying to do?
Want to explore QUnit CLI and created a sample project to capture basic test cases.
To import module I used ES6 module import mechanism.
To support this, I modified
package.json
by adding"type": "module"
:In
test.js
file import a module which having all test cases:Here is the content of
test-cases.js
:Here is the content of
math.js
:I executed following command to run tests & it's gives 'ERR_UNSUPPORTED_ESM_URL_SCHEME error' as a result:
npx qunit ./test.js
What did you expect to happen?
I expected to execute all test cases & output the result.
What actually happened?
I'm getting following error message:
Please help me to resolve the issue.
I need to import module in ES6 way and not in CommonJS way.
NOTE
If I modify line no: 87 in the file
node_modules\qunit\src\cli\run.js
with following code, problem is getting resolved:The text was updated successfully, but these errors were encountered: