diff --git a/bin/_mocha b/bin/_mocha index ad4ed40373..559e91fdfb 100755 --- a/bin/_mocha +++ b/bin/_mocha @@ -295,9 +295,9 @@ if (program.retries) mocha.suite.retries(program.retries); var extensions = ['js']; program.compilers.forEach(function(c) { - var compiler = c.split(':') - , ext = compiler[0] - , mod = compiler[1]; + var idx = c.indexOf(':') + , ext = c.slice(0, idx) + , mod = c.slice(idx + 1); if (mod[0] == '.') mod = join(process.cwd(), mod); require(mod);