Support multiple module
parameters (QUnit.config.module array)
#1742
Labels
Component: Core
For module, test, hooks, and reporters.
Type: Enhancement
New idea or feature request.
Milestone
Tell us about your runtime:
What are you trying to do?
I'm trying to run tests for multiple modules by providing a URL directly, without initial UI interactions on my side.
Code that reproduces the problem:
In jQuery, we have multiple test modules. It is possible to choose them from the module dropdown which results in multiple
moduleId
added to the URL. But you cannot compute those moduleIds in your mind easily since they are hashed.QUnit supports specifying a module via the
module
query parameter. In jQuery, we often use it to run tests divided by module on TestSwarm in CI.I'd like to pass multiple modules via specifying the
module
field directly multiple times. Example:?module=support&module=basic
.What did you expect to happen?
I expected
?module=support&module=basic
to run all the tests from thesupport
&basic
modules.What actually happened?
Passing the
module
parameter multiple times results in errors. If you e.g. pass?module=support&module=basic
, you get an error:The error happens in the following line:
qunit/src/test.js
Line 835 in 8ea67f4
It happens because while in the
?module=support
caseconfig.module
is"support"
, in the?module=support&module=basic
case it's an array:["support", "basic"]
.I think this way of passing multiple modules worked in the past. Can we bring it back?
The text was updated successfully, but these errors were encountered: