qunit icon indicating copy to clipboard operation
qunit copied to clipboard

Using Qunit 2.17.0, dynamic import of a javascript test file results in error: qunit.js:2843 Unexpected test after runEnd. This is unstable and will fail in QUnit 3.0.

Open i94alan opened this issue 2 years ago • 0 comments

  • QUnit version: 2.17.0
  • Which environment are you using? (e.g., browser, Node): browser
  • How are you running QUnit? (e.g., QUnit CLI, Grunt, Karma, manually in browser): manually in browser

What are you trying to do?

Originally, I run parent.js with qunit.js in a test.html: with qunit-2.16.0

...

parent.js uses dynamic import to import child1.js and child2.js which contain Qunit tests, and they are executed successfully.

Now,

I upgrade Qunit to 2.17.0, then Qunit test in child1.js and child2.js has this problem: qunit.js:2843 Unexpected test after runEnd. This is unstable and will fail in QUnit 3.0.

BUT, if I use static import for child1.js and child2.js, their test will be executed successfully.

Question: Can QUnit 2.17.0 support dynamic import of a Javaacript Qunit test files( in my case, child1.js, child2.js). If it does not support dynamic import, then I will have to test child1.js and child2.js with static import:

...

i94alan avatar Jun 25 '22 02:06 i94alan