We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce5bb28 commit 59b5a74Copy full SHA for 59b5a74
lib/container.js
@@ -39,8 +39,14 @@ class Container {
39
*/
40
static create(config, opts) {
41
asyncHelperPromise = Promise.resolve();
42
- this.createMocha(config, opts);
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
50
container.support = {};
51
container.helpers = createHelpers(config.helpers || {});
52
container.translation = loadTranslation(config.translation || null, config.vocabularies || []);
0 commit comments