From 1897602795acd0bb885f3d29e39608c1d3fac9af Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Mon, 28 Nov 2016 23:36:05 -0800 Subject: [PATCH] Fix fiber feature flag for ReactDOMProduction-test (#8451) --- scripts/fiber/tests-failing.txt | 3 +++ scripts/fiber/tests-passing.txt | 1 - .../classic/types/__tests__/ReactPropTypesProduction-test.js | 4 +++- src/renderers/dom/__tests__/ReactDOMProduction-test.js | 4 +++- src/renderers/shared/utils/__tests__/ReactErrorUtils-test.js | 4 +++- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/fiber/tests-failing.txt b/scripts/fiber/tests-failing.txt index c6cc4d56cd1a..6c068aab0da8 100644 --- a/scripts/fiber/tests-failing.txt +++ b/scripts/fiber/tests-failing.txt @@ -24,6 +24,9 @@ src/renderers/art/__tests__/ReactART-test.js * resolves refs before componentDidMount * resolves refs before componentDidUpdate +src/renderers/dom/__tests__/ReactDOMProduction-test.js +* should throw with an error code in production + src/renderers/dom/shared/__tests__/ReactDOM-test.js * throws in render() if the mount callback is not a function * throws in render() if the update callback is not a function diff --git a/scripts/fiber/tests-passing.txt b/scripts/fiber/tests-passing.txt index 82b33be0f6c4..ee3849f47efe 100644 --- a/scripts/fiber/tests-passing.txt +++ b/scripts/fiber/tests-passing.txt @@ -490,7 +490,6 @@ src/renderers/dom/__tests__/ReactDOMProduction-test.js * should use prod React * should handle a simple flow * should call lifecycle methods -* should throw with an error code in production src/renderers/dom/fiber/__tests__/ReactDOMFiber-test.js * should render strings as children diff --git a/src/isomorphic/classic/types/__tests__/ReactPropTypesProduction-test.js b/src/isomorphic/classic/types/__tests__/ReactPropTypesProduction-test.js index 0c42b4c46746..0fef9c61cf81 100644 --- a/src/isomorphic/classic/types/__tests__/ReactPropTypesProduction-test.js +++ b/src/isomorphic/classic/types/__tests__/ReactPropTypesProduction-test.js @@ -22,7 +22,9 @@ describe('ReactPropTypesProduction', function() { beforeEach(function() { __DEV__ = false; oldProcess = process; - global.process = {env: {NODE_ENV: 'production'}}; + global.process = { + env: Object.assign({}, process.env, {NODE_ENV: 'production'}), + }; jest.resetModuleRegistry(); PropTypes = require('ReactPropTypes'); diff --git a/src/renderers/dom/__tests__/ReactDOMProduction-test.js b/src/renderers/dom/__tests__/ReactDOMProduction-test.js index 4699975e360c..c64a9411808e 100644 --- a/src/renderers/dom/__tests__/ReactDOMProduction-test.js +++ b/src/renderers/dom/__tests__/ReactDOMProduction-test.js @@ -19,7 +19,9 @@ describe('ReactDOMProduction', () => { beforeEach(() => { __DEV__ = false; oldProcess = process; - global.process = {env: {NODE_ENV: 'production'}}; + global.process = { + env: Object.assign({}, process.env, {NODE_ENV: 'production'}), + }; jest.resetModuleRegistry(); React = require('React'); diff --git a/src/renderers/shared/utils/__tests__/ReactErrorUtils-test.js b/src/renderers/shared/utils/__tests__/ReactErrorUtils-test.js index b152a674d700..996dff8748c7 100644 --- a/src/renderers/shared/utils/__tests__/ReactErrorUtils-test.js +++ b/src/renderers/shared/utils/__tests__/ReactErrorUtils-test.js @@ -60,7 +60,9 @@ describe('ReactErrorUtils', () => { ); __DEV__ = false; var oldProcess = process; - global.process = {env: {NODE_ENV: 'production'}}; + global.process = { + env: Object.assign({}, process.env, {NODE_ENV: 'production'}), + }; jest.resetModuleRegistry(); ReactErrorUtils = require('ReactErrorUtils'); expect(ReactErrorUtils.invokeGuardedCallback).toEqual(