Open Krinkle opened 4 years ago
I've added:
QUnit.onError
(deprecated in https://github.com/qunitjs/qunit/pull/1638).Another thing, the HTML UI is currently unable to report global failures from before the first test in the UI because the qunit-tests
element is created from QUnit.begin()
which naturally fires just after the tests have been loaded, not before.
I'd like to address this by having the UI initialise right away instead of waiting for QUnit.begin()
. Given how tight some wrappers and integrations are, though, I propose we do this in QUnit 3.0 rather than now.
I propose the following for QUnit 3 as well:
- Remove support for Node.js 10, require Node.js 12+.
may as well add removing node14 by now, too.
but anywho, reason why I came here is --- ESM.
Currently, the qunit package is not valid, and rollup will error if it tries processing imports of qunit. Is this something that we need to wait for QUnit 3 to fix? or can we fix in v2?
@NullVoxPopuli That sounds like something we can fix in a minor release.
If I understand correctly, you're looking to import qunit
and embed within a larger bundle? I've not tried to do that myself, but in terms of loading it over ESM, that seems to work in both browsers and Node.js. E.g. in browsers await import("https://code.jquery.com/qunit/qunit-2.19.4.js");
results in QUnit being defined, and in Node.js, import('qunit');
returns the QUnit API.
Could you file a bug report with details on where it currently fails?
sounds good: https://github.com/qunitjs/qunit/issues/1724
can we change the whole package to use modern JS? I see IIFE, and non-class usage when it looks like it really wants to be using classes. I'm willing to make PRs, add tests, etc.
and for v3, can we extract non-browser utils to like a @qunit/cli
or something?
It will be really handy to have builtin retry as in playwright-test - https://playwright.dev/docs/test-retries Related issue: https://github.com/qunitjs/qunit/issues/1572 Related qunit addon: https://github.com/mrloop/QUnit-retry
In our usual way, QUnit 3.0 will be a trivial release that adds no features, but only removes deprecated functionality and/or changes default settings.
Users should be able to update to the latest QUnit 2.x release and get all the same new capabilities. Anything that passes on the latest QUnit 2.x without warnings must pass on QUnit 3.0. Anything we want to change in QUnit 3.0 should be deprecated or issue warnings on QUnit 2.0 so that users can gradually address these warnings, and then perform an super simple, uneventful, upgrade to QUnit 3.0.
Before QUnit 3 development starts
QUnit 3 development
Notable changes:
QUnit.load
(deprecated in https://github.com/qunitjs/qunit/issues/1084).QUnit.onError
(deprecated in https://github.com/qunitjs/qunit/pull/1638).QUnit.module
(ref https://github.com/qunitjs/qunit/issues/1600).before
from parent modules, same asbeforeEach
today (ref https://github.com/qunitjs/qunit/issues/1328).Other work:
Other ideas
qunit/
subdirectory in favour ofdist/
(ref https://github.com/qunitjs/qunit/issues/1133). We ended up doing the reverse instead, thus not a breaking change, and already done during 2.x.QUnit.module
(deprecated in https://github.com/qunitjs/qunit/issues/1162).