diff --git a/bin/qunit.js b/bin/qunit.js index 7303289af..977eb9546 100755 --- a/bin/qunit.js +++ b/bin/qunit.js @@ -32,7 +32,11 @@ program "any tests.", collect, [] ) .option( "--seed [value]", "specify a seed to re-order your tests; " + "if specified without a value, a seed will be generated" ) - .option( "-w, --watch", "watch files for changes and re-run the test suite" ) + .option("-m, --module ", "run a specific module") + .option("-w, --watch", "watch files for changes and re-run the test suite") + // allow passing options to handle in setup files + .allowUnknownOption() + .allowExcessArguments() .parse( process.argv ); const opts = program.opts(); @@ -46,7 +50,8 @@ const options = { filter: opts.filter, reporter: opts.reporter, requires: opts.require, - seed: opts.seed + seed: opts.seed, + module: opts.module }; if ( opts.watch ) { diff --git a/src/cli/run.js b/src/cli/run.js index 4e5fdb7f8..ec339eb46 100644 --- a/src/cli/run.js +++ b/src/cli/run.js @@ -27,6 +27,9 @@ async function run( args, options ) { if ( options.filter ) { QUnit.config.filter = options.filter; } + if ( options.module ) { + QUnit.config.module = options.module; + } const seed = options.seed; if ( seed ) {