aboutsummaryrefslogtreecommitdiff
path: root/node_modules/ava/lib/fork.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/ava/lib/fork.js')
-rw-r--r--node_modules/ava/lib/fork.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/node_modules/ava/lib/fork.js b/node_modules/ava/lib/fork.js
index bf918d391..0ca0f45a4 100644
--- a/node_modules/ava/lib/fork.js
+++ b/node_modules/ava/lib/fork.js
@@ -10,12 +10,10 @@ if (fs.realpathSync(__filename) !== __filename) {
console.warn('WARNING: `npm link ava` and the `--preserve-symlink` flag are incompatible. We have detected that AVA is linked via `npm link`, and that you are using either an early version of Node 6, or the `--preserve-symlink` flag. This breaks AVA. You should upgrade to Node 6.2.0+, avoid the `--preserve-symlink` flag, or avoid using `npm link ava`.');
}
-let env = process.env;
+const env = Object.assign({NODE_ENV: 'test'}, process.env);
// Ensure NODE_PATH paths are absolute
if (env.NODE_PATH) {
- env = Object.assign({}, env);
-
env.NODE_PATH = env.NODE_PATH
.split(path.delimiter)
.map(x => path.resolve(x))