From 10754a65c683980d4bea4a4b45ce90bc525eefca Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Fri, 5 Jan 2018 12:12:54 -0700 Subject: [PATCH] don't apply configuration from dotfiles during testing --- config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config.js b/config.js index 0d6643269..e617b93e8 100644 --- a/config.js +++ b/config.js @@ -7,9 +7,12 @@ // entrypoint for the entire applications configuration. require('env-rewrite').rewrite(); -// Apply all the configuration provided in the .env file if it isn't already -// in the environment. -require('dotenv').config(); +if (process.env.NODE_ENV !== 'test') { + + // Apply all the configuration provided in the .env file if it isn't already + // in the environment. + require('dotenv').config(); +} const uniq = require('lodash/uniq'); const ms = require('ms');