Moved __DEV__ setup from setupTests to setupEnv
Brian Vaughn committed
Apr 11, 2019 at 11:38 UTC
7bb2299de414cad78408187398345aa85950c6d5
2 files changed
+3
-3
src/__tests__/setupEnv.js
+3
@@ -9,3 +9,6 @@ import 'regenerator-runtime/runtime';
9
if (!global.hasOwnProperty('localStorage')) {
10
global.localStorage = storage;
11
}
12
+
13
+// Mimic the global we set with Webpack's DefinePlugin
14
+global.__DEV__ = process.env.NODE_ENV !== 'production';
src/__tests__/setupTests.js
-3
@@ -6,9 +6,6 @@ import Bridge from 'src/bridge';
6
import Store from 'src/devtools/store';
7
import { installHook } from 'src/hook';
8
9
-// Mimic the global we set with Webpack's DefinePlugin
10
-global.__DEV__ = process.env.NODE_ENV !== 'production';
11
-
9
const env = jasmine.getEnv();
10
env.beforeEach(() => {
11
// It's important to reset modules between test runs;