fix conditional

This commit is contained in:
Rodrigo Antinarelli committed 2019-06-13 16:20:29 -03:00
1 parent 1cbbbd6989
commit cb2871d377
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -31,10 +31,10 @@ function getKeyForNameSpaces(key) {
}
function getLocales() {
const isWebpackEnv = !!require.context('./locales', true, /\.json$/);
var isTestEnvironment = process.env.NODE_ENV === 'test';
// require.context is exclusive from webpack, it's needed to escape inside jest
if (!isWebpackEnv) {
// require.context is exclusive from webpack. This conditional is needed to escape while running tests
if (isTestEnvironment) {
return {};
}