Skip to content

Commit a5ae9d7

Browse files
committed
Setting NODE_ENV to test instead because setting it to prod will supress error messaging
1 parent 4f49b0a commit a5ae9d7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/testSetup.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
// Tests are placed alongside files under test.
22
// This file does the following:
3-
// 1. Sets the environment to 'production' so that
3+
// 1. Sets the environment to 'test' so that
44
// dev-specific babel config in .babelrc doesn't run.
55
// 2. Disables Webpack-specific features that Mocha doesn't understand.
66
// 3. Registers babel for transpiling our code for testing.
77

88
// This assures the .babelrc dev config (which includes
99
// hot module reloading code) doesn't apply for tests.
10-
process.env.NODE_ENV = 'production';
10+
// Setting NODE_ENV to test instead of production because setting it to production will suppress error messaging
11+
// and propType validation warnings.
12+
process.env.NODE_ENV = 'test';
1113

1214
// Disable webpack-specific features for tests since
1315
// Mocha doesn't know what to do with them.

0 commit comments

Comments
 (0)