Open deepestblue opened 4 years ago
Stale issue message
@deepestblue Could you elaborate briefly where you are looking to import the QUnit package? It is not generally used as a library, but as a test runner. This means there is generally not a need to import "qunit"
. I'd like to help unblock you as soon as possible. I suspect https://github.com/qunitjs/qunit/issues/1465 would be all you need, at which point you can run qunit test/
or qunit test/foo.esm
etc and it will just work for CJS and ESM test suites alike.
@Krinkle thanks for reaching out. Yes, I use QUnit as a test runner through an HTML page that I have to manually open in a browser to run tests. And I want to not have to do that, so that I can use online CI suites. I'm no Node ecosystem expert, but it looks like qunitjs/qunit#1465 is what I need, so I just subscribed to the issue. Thanks!
@deepestblue ES6 support for Node.js has been released in QUnit 2.13.
QUnit already worked with ESM imports in the browser, which I see this project already uses 🙂 . As of QUnit 2.13 these can be loaded from the QUnit CLI on Node.js as well, e.g. qunit test/*.mjs
. Ping me if you need anything!
The QUnit CLI can be called from CI via the test script in package.json.
But, if you're looking for a more advanced setup where the browser variant is tested as well and e.g. with combined code coverage reporting, then this example repo might offer some inspiration.
Blocked by https://github.com/orgs/avajs/projects/2 or by https://github.com/qunitjs/qunit/issues/1281