☕️ Classic, reliable, trusted test framework for Node.js and the browser
Add support for -gc / --expose-gc.
Nathan Rajlich2e09b4bea815
diff --git a/bin/mocha b/bin/mochaindex 8782358d..4cbbac4a 100755--- a/bin/mocha+++ b/bin/mocha@@ -6,18 +6,23 @@*/var spawn = require('child_process').spawn- , args = process.argv.slice(2)+ , args = [ __dirname + '/_mocha' ];-args.unshift(__dirname + '/_mocha');--process.argv.forEach(function (arg) {+process.argv.slice(2).forEach(function (arg) {switch (arg) {case '-d':case '--debug':args.unshift('debug');break;+ case '-gc':+ case '--expose-gc':+ args.unshift('--expose-gc');+ break;+ default:+ args.push(arg);+ break;}});var proc = spawn(process.argv[0], args, { customFds: [0,1,2] });-proc.on('exit', process.exit);\ No newline at end of file+proc.on('exit', process.exit);