Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Add --preserve-symlinks flag for node (#2364)

Ross Warren81873618c9d2
diff --git a/bin/_mocha b/bin/_mocha
index 94550d87..8a3f50ad 100755
--- a/bin/_mocha
+++ b/bin/_mocha
@@ -84,6 +84,7 @@ program
.option('--globals <names>', 'allow the given comma-delimited global [names]', list, [])
.option('--es_staging', 'enable all staged features')
.option('--harmony<_classes,_generators,...>', 'all node --harmony* flags are available')
+ .option('--preserve-symlinks', 'Instructs the module loader to preserve symbolic links when resolving and caching modules')
.option('--icu-data-dir', 'include ICU data')
.option('--inline-diffs', 'display actual/expected differences inline within each string')
.option('--interfaces', 'display available interfaces')
diff --git a/bin/mocha b/bin/mocha
index f6606e49..99bc18ae 100755
--- a/bin/mocha
+++ b/bin/mocha
@@ -50,6 +50,7 @@ process.argv.slice(2).forEach(function(arg){
else if (0 == arg.indexOf('--trace')) args.unshift(arg);
else if (0 == arg.indexOf('--icu-data-dir')) args.unshift(arg);
else if (0 == arg.indexOf('--max-old-space-size')) args.unshift(arg);
+ else if (0 == arg.indexOf('--preserve-symlinks')) args.unshift(arg);
else args.push(arg);
break;
}