Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Cleanup #1267

Travis Jefferyc6e658a76d42
diff --git a/lib/mocha.js b/lib/mocha.js
index 7882fb64..05c02795 100644
--- a/lib/mocha.js
+++ b/lib/mocha.js
@@ -13,6 +13,12 @@ var path = require('path')
, join = path.join
, cwd = process.cwd();
+/**
+ * Add node_modules directory to use local modules for ui and reporters.
+ */
+
+module.paths.push(cwd, join(cwd, 'node_modules'));
+
/**
* Expose `Mocha`.
*/
@@ -64,7 +70,6 @@ function image(name) {
*/
function Mocha(options) {
- module.paths.push(cwd, join(cwd, 'node_modules'));
options = options || {};
this.files = [];
this.options = options;