Skip to content

armgit / mocha

Public Imported from GitHub
0

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

misc refactoring

Tj Holowaychuk67dd5b45c3f1
diff --git a/bin/mocha b/bin/mocha
index 41d64097..0bca43fb 100755
--- a/bin/mocha
+++ b/bin/mocha
@@ -87,8 +87,10 @@ program.on('require', function(mod){
// mocha.opts support
try {
- var opts = fs.readFileSync('test/mocha.opts', 'utf8').trim();
- opts = opts.split(/\s+/);
+ var opts = fs.readFileSync('test/mocha.opts', 'utf8')
+ .trim()
+ .split(/\s+/);
+
process.argv = process.argv
.slice(0, 2)
.concat(opts.concat(process.argv.slice(2)));