Skip to content
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

Switch to ES6 Node testing #11

Open
deepestblue opened this issue Feb 17, 2020 · 6 comments
Open

Switch to ES6 Node testing #11

deepestblue opened this issue Feb 17, 2020 · 6 comments
Labels
blocked Blocked by another bug, within this project or upstream

Comments

@deepestblue
Copy link
Owner

No description provided.

@deepestblue deepestblue added enhancement New feature or request and removed enhancement New feature or request labels Feb 20, 2020
@deepestblue
Copy link
Owner Author

deepestblue commented Feb 20, 2020

@deepestblue deepestblue added the blocked Blocked by another bug, within this project or upstream label Feb 20, 2020
@github-actions
Copy link

Stale issue message

@deepestblue deepestblue reopened this Apr 28, 2020
@deepestblue deepestblue changed the title Switch to AvaJS Switch to ES6 Node testing Aug 30, 2020
@Krinkle
Copy link

Krinkle commented Nov 13, 2020

@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 qunitjs/qunit#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.

@deepestblue
Copy link
Owner Author

@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!

@Krinkle
Copy link

Krinkle commented Jan 2, 2021

@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!

@Krinkle
Copy link

Krinkle commented Jan 2, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by another bug, within this project or upstream
Projects
None yet
Development

No branches or pull requests

2 participants