-
Notifications
You must be signed in to change notification settings - Fork 779
Closed
Labels
Type: QuestionAsk questions or seek assistance.Ask questions or seek assistance.
Description
- 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
<!DOCTYPE html>
<html>
<head>
...
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="third_party/qunit/qunit-qunit-2.16.0.js"></script>
<script type="module" src="parent.js"></script>
</body>
</html>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:
<!DOCTYPE html>
<html>
<head>
...
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="third_party/qunit/qunit-qunit-2.16.0.js"></script>
<script type="module" src="parent.js"></script>
<script type="module" src="child1.js"></script>
<script type="module" src="child2.js"></script>
</body>
</html>Metadata
Metadata
Assignees
Labels
Type: QuestionAsk questions or seek assistance.Ask questions or seek assistance.