Skip to content

Commit 59b5a74

Browse files
author
DavertMik
committed
fixed runner tests
1 parent ce5bb28 commit 59b5a74

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/container.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,14 @@ class Container {
3939
*/
4040
static create(config, opts) {
4141
asyncHelperPromise = Promise.resolve();
42-
this.createMocha(config, opts);
4342

43+
// dynamically create mocha instance
44+
const mochaConfig = config.mocha || {};
45+
if (config.grep && !opts.grep) mochaConfig.grep = config.grep;
46+
this.createMocha = () => (container.mocha = MochaFactory.create(mochaConfig, opts || {}));
47+
this.createMocha();
48+
49+
// create support objects
4450
container.support = {};
4551
container.helpers = createHelpers(config.helpers || {});
4652
container.translation = loadTranslation(config.translation || null, config.vocabularies || []);

0 commit comments

Comments
 (0)