Skip to content

Commit

Permalink
Framework: Change references to removed React internal lib paths
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Nov 22, 2016
1 parent 5e56590 commit 89ac0c8
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions client/auth/test/login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) => {
Expand All @@ -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( <Login />, useFakeDom.getContainer() );
} );
Expand Down
6 changes: 3 additions & 3 deletions client/boot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' ),
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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' );

Expand Down
6 changes: 3 additions & 3 deletions client/components/count/test/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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( '../' );
} );

Expand Down
4 changes: 2 additions & 2 deletions client/components/forms/counted-textarea/test/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand All @@ -11,7 +11,7 @@ describe( 'index', function() {
var CountedTextarea, renderer;

before( function() {
ReactInjection.Class.injectMixin( i18n.mixin );
ReactClass.injection.injectMixin( i18n.mixin );
CountedTextarea = require( '../' );
} );

Expand Down
6 changes: 3 additions & 3 deletions client/components/forms/form-phone-input/test/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ 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();

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' );
Expand All @@ -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();
} );
Expand Down
4 changes: 2 additions & 2 deletions client/my-sites/plugins/plugins-list/test/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
} );

Expand Down
6 changes: 3 additions & 3 deletions client/my-sites/upgrades/domain-management/list/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { useSandbox } from 'test/helpers/use-sinon';
describe( 'index', function() {
let React,
ReactDom,
ReactInjection,
ReactClass,
DomainList,
TestUtils,
noticeTypes,
Expand Down Expand Up @@ -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;
} );
Expand Down

0 comments on commit 89ac0c8

Please sign in to comment.