From f28da97faaa5fe241e018c6528039bd7ee13f1f2 Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Sun, 18 Sep 2016 12:31:08 -0700 Subject: [PATCH] fix some merges --- bin/_mocha | 2 +- lib/interfaces/qunit.js | 40 ++++++++++++++++++---------------------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/bin/_mocha b/bin/_mocha index 2c2a4d9799..b855ff7249 100755 --- a/bin/_mocha +++ b/bin/_mocha @@ -105,7 +105,7 @@ program .option('--trace-deprecation', 'show stack traces on deprecations') .option('--use_strict', 'enforce strict mode') .option('--watch-extensions ,...', 'additional extensions to monitor with --watch', list, []) - .option('--delay', 'wait for async suite definition'); + .option('--delay', 'wait for async suite definition') .option('--generate-seed', 'generate a random seed and exit') .option('--random ', 'randomize order of tests (with required random seed)'); diff --git a/lib/interfaces/qunit.js b/lib/interfaces/qunit.js index 855044f632..a636de4846 100644 --- a/lib/interfaces/qunit.js +++ b/lib/interfaces/qunit.js @@ -55,45 +55,41 @@ module.exports = function(suite) { }; /** - * Do not randomize. + * Exclusive Suite. */ - context.suite.inOrder = function(title) { - var suite = common.suite.create({ + context.suite.only = function(title) { + if (suites.length > 1) { + suites.shift(); + } + return common.suite.only({ title: title, - file: file, + file: file }); - suite.enableRandomize(false); - return suite; }; - context.suite.only.inOrder = - context.suite.inOrder.only = function(title) { - var suite = common.suite.only({ + /** + * Do not randomize. + */ + context.suite.inOrder = function(title) { + var suite = common.suite.create({ title: title, - file: file, + file: file }); suite.enableRandomize(false); return suite; }; /** - * Exclusive Suite. + * Do not randomize + exclusive */ - - context.suite.only = function(title) { - if (suites.length > 1) { - suites.shift(); - } - return common.suite.only({ + context.suite.only.inOrder = context.suite.inOrder.only = function(title) { + var suite = common.suite.only({ title: title, file: file }); + suite.enableRandomize(false); + return suite; }; - context.suite.only.inOrder = context.suite.inOrder.only - = function(title, fn) { - var suite = context.suite.inOrder(title, fn); - mocha.grep(suite.fullTitle()); - }; /** * Describe a specification or test-case