Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Fixed absolute path support. Closes #215 [kompiro]

TJ Holowaychuk3d8f7d2929dd
diff --git a/bin/_mocha b/bin/_mocha
index 8cc6dbca..1e494b03 100755
--- a/bin/_mocha
+++ b/bin/_mocha
@@ -7,6 +7,7 @@
var program = require('commander')
, exec = require('child_process').exec
, path = require('path')
+ , resolve = path.resolve
, mocha = require('../')
, utils = mocha.utils
, reporters = mocha.reporters
@@ -175,8 +176,7 @@ if (!files.length) {
// resolve
files = files.map(function(path){
- path = require.resolve(join(cwd, path));
- return path;
+ return resolve(path);
});
// --watch