Skip to content

Commit

Permalink
fix: update setupTest to look for .env.test (#19)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: jest test setup configuration will look for .env.test instead of .env.development and no longer warn in the console if none is found.
  • Loading branch information
Adam Butterworth committed Nov 5, 2019
1 parent 52754cb commit 15d0251
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions config/jest/setupTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ require('babel-polyfill');

const { PROJECT_ROOT } = require('../../lib/paths');

const testEnvFile = path.resolve(PROJECT_ROOT, '.env.development');
const testEnvFile = path.resolve(PROJECT_ROOT, '.env.test');

if (fs.existsSync(testEnvFile)) {
dotenv.config({ path: testEnvFile });
} else {
console.log(`No .env.development file found at ${testEnvFile}. No env vars will be loaded.`);
}

0 comments on commit 15d0251

Please sign in to comment.