diff --git a/client/auth/test/login.jsx b/client/auth/test/login.jsx index dae235614f580..21fde5c49dcc6 100644 --- a/client/auth/test/login.jsx +++ b/client/auth/test/login.jsx @@ -12,7 +12,7 @@ import useFakeDom from 'test/helpers/use-fake-dom'; import useMockery from 'test/helpers/use-mockery'; describe( 'LoginTest', function() { - let Login, loginStub, page, React, ReactDom, ReactInjection, TestUtils; + let Login, loginStub, page, React, ReactDom, ReactClass, TestUtils; useFakeDom.withContainer(); useMockery( ( mockery ) => { @@ -26,9 +26,9 @@ describe( 'LoginTest', function() { before( () => { React = require( 'react' ); ReactDom = require( 'react-dom' ); - ReactInjection = require( 'react/lib/ReactInjection' ); + ReactClass = require( 'react/lib/ReactClass' ); TestUtils = require( 'react-addons-test-utils' ); - ReactInjection.Class.injectMixin( { translate: identity } ); + ReactClass.injection.injectMixin( { translate: identity } ); Login = require( '../login.jsx' ); page = ReactDom.render( , useFakeDom.getContainer() ); } ); diff --git a/client/boot/index.js b/client/boot/index.js index 553db3ed6ac4e..42ca408bb8c23 100644 --- a/client/boot/index.js +++ b/client/boot/index.js @@ -10,7 +10,7 @@ if ( process.env.NODE_ENV === 'development' ) { var React = require( 'react' ), ReactDom = require( 'react-dom' ), store = require( 'store' ), - ReactInjection = require( 'react/lib/ReactInjection' ), + ReactClass = require( 'react/lib/ReactClass' ), some = require( 'lodash/some' ), startsWith = require( 'lodash/startsWith' ), debug = require( 'debug' )( 'calypso' ), @@ -70,7 +70,7 @@ function init() { i18n.setLocale( i18nLocaleStringsObject ); } - ReactInjection.Class.injectMixin( i18n.mixin ); + ReactClass.injection.injectMixin( i18n.mixin ); // Infer touch screen by checking if device supports touch events // See touch-detect/README.md @@ -130,7 +130,7 @@ function loadDevModulesAndBoot() { // Since loading this fragment is asynchronous and we need to inject this mixin into all React classes, // we have to wait for it to load before proceeding with the application's startup. require.ensure( [], function() { - ReactInjection.Class.injectMixin( require( 'lib/mixins/render-visualizer' ) ); + ReactClass.injection.injectMixin( require( 'lib/mixins/render-visualizer' ) ); boot(); }, 'devmodules' ); diff --git a/client/components/count/test/index.jsx b/client/components/count/test/index.jsx index 423e2e5dc414b..7fc84e45aaa9d 100644 --- a/client/components/count/test/index.jsx +++ b/client/components/count/test/index.jsx @@ -5,17 +5,17 @@ var expect = require( 'chai' ).expect, useMockery = require( 'test/helpers/use-mockery' ); describe( 'Count', function() { - var React, ReactInjection, TestUtils, Count, renderer; + var React, ReactClass, TestUtils, Count, renderer; // really only using Mockery for the clean module cache useMockery(); before( function() { React = require( 'react' ); - ReactInjection = require( 'react/lib/ReactInjection' ); + ReactClass = require( 'react/lib/ReactClass' ); TestUtils = require( 'react-addons-test-utils' ); - ReactInjection.Class.injectMixin( require( 'i18n-calypso' ).mixin ); + ReactClass.injection.injectMixin( require( 'i18n-calypso' ).mixin ); Count = require( '../' ); } ); diff --git a/client/components/forms/counted-textarea/test/index.jsx b/client/components/forms/counted-textarea/test/index.jsx index db75f8893db81..9dd8d2c2900b3 100644 --- a/client/components/forms/counted-textarea/test/index.jsx +++ b/client/components/forms/counted-textarea/test/index.jsx @@ -2,7 +2,7 @@ * External dependencies */ var React = require( 'react' ), - ReactInjection = require( 'react/lib/ReactInjection' ), + ReactClass = require( 'react/lib/ReactClass' ), TestUtils = require( 'react-addons-test-utils' ), expect = require( 'chai' ).expect, i18n = require( 'i18n-calypso' ); @@ -11,7 +11,7 @@ describe( 'index', function() { var CountedTextarea, renderer; before( function() { - ReactInjection.Class.injectMixin( i18n.mixin ); + ReactClass.injection.injectMixin( i18n.mixin ); CountedTextarea = require( '../' ); } ); diff --git a/client/components/forms/form-phone-input/test/index.jsx b/client/components/forms/form-phone-input/test/index.jsx index e2cfd8b98d22e..04802d66348fd 100644 --- a/client/components/forms/form-phone-input/test/index.jsx +++ b/client/components/forms/form-phone-input/test/index.jsx @@ -7,7 +7,7 @@ var expect = require( 'chai' ).expect, useMockery = require( 'test/helpers/use-mockery' ); describe( 'FormPhoneInput', function() { - var React, ReactDom, ReactInjection, TestUtils, i18n, mockCountriesList, mockCountriesListEmpty, FormPhoneInput, countries, container; + var React, ReactDom, ReactClass, TestUtils, i18n, mockCountriesList, mockCountriesListEmpty, FormPhoneInput, countries, container; useFakeDom(); useMockery(); @@ -15,7 +15,7 @@ describe( 'FormPhoneInput', function() { before( function() { ReactDom = require( 'react-dom' ); React = require( 'react' ); - ReactInjection = require( 'react/lib/ReactInjection' ); + ReactClass = require( 'react/lib/ReactClass' ); TestUtils = require( 'react-addons-test-utils' ); i18n = require( 'i18n-calypso' ); @@ -24,7 +24,7 @@ describe( 'FormPhoneInput', function() { countries = mockCountriesList.get(); - ReactInjection.Class.injectMixin( i18n.mixin ); + ReactClass.injection.injectMixin( i18n.mixin ); FormPhoneInput = require( 'components/forms/form-phone-input' ); container = getContainer(); } ); diff --git a/client/my-sites/plugins/plugins-list/test/index.jsx b/client/my-sites/plugins/plugins-list/test/index.jsx index 2816c208d8977..77db81512c711 100644 --- a/client/my-sites/plugins/plugins-list/test/index.jsx +++ b/client/my-sites/plugins/plugins-list/test/index.jsx @@ -34,9 +34,9 @@ describe( 'PluginsList', () => { before( () => { React = require( 'react' ); TestUtils = require( 'react-addons-test-utils' ); - const ReactInjection = require( 'react/lib/ReactInjection' ); + const ReactClass = require( 'react/lib/ReactClass' ); - ReactInjection.Class.injectMixin( require( 'i18n-calypso' ).mixin ); + ReactClass.injection.injectMixin( require( 'i18n-calypso' ).mixin ); testRenderer = TestUtils.renderIntoDocument; diff --git a/client/my-sites/upgrades/domain-management/edit/test/mapped-domain.js b/client/my-sites/upgrades/domain-management/edit/test/mapped-domain.js index 0ef770deb7485..ac0b06481a8ae 100644 --- a/client/my-sites/upgrades/domain-management/edit/test/mapped-domain.js +++ b/client/my-sites/upgrades/domain-management/edit/test/mapped-domain.js @@ -39,8 +39,8 @@ describe( 'mapped-domain', () => { React = require( 'react' ); TestUtils = require( 'react-addons-test-utils' ); - const ReactInjection = require( 'react/lib/ReactInjection' ); - ReactInjection.Class.injectMixin( require( 'i18n-calypso' ).mixin ); + const ReactClass = require( 'react/lib/ReactClass' ); + ReactClass.injection.injectMixin( require( 'i18n-calypso' ).mixin ); MappedDomain = require( '../mapped-domain.jsx' ); } ); diff --git a/client/my-sites/upgrades/domain-management/list/test/index.js b/client/my-sites/upgrades/domain-management/list/test/index.js index 382392ab81e47..6ce4e78e11d4e 100644 --- a/client/my-sites/upgrades/domain-management/list/test/index.js +++ b/client/my-sites/upgrades/domain-management/list/test/index.js @@ -16,7 +16,7 @@ import { useSandbox } from 'test/helpers/use-sinon'; describe( 'index', function() { let React, ReactDom, - ReactInjection, + ReactClass, DomainList, TestUtils, noticeTypes, @@ -52,8 +52,8 @@ describe( 'index', function() { noticeTypes = require( '../constants' ); - ReactInjection = require( 'react/lib/ReactInjection' ); - ReactInjection.Class.injectMixin( require( 'i18n-calypso' ).mixin ); + ReactClass = require( 'react/lib/ReactClass' ); + ReactClass.injection.injectMixin( require( 'i18n-calypso' ).mixin ); DomainList = require( '../' ).List; } );