@@ -14,10 +14,6 @@ describe('React', () => {
1414 }
1515
1616 class ProviderMock extends Component {
17- static childContextTypes = {
18- store : PropTypes . object . isRequired
19- }
20-
2117 getChildContext ( ) {
2218 return { store : this . props . store }
2319 }
@@ -27,6 +23,10 @@ describe('React', () => {
2723 }
2824 }
2925
26+ ProviderMock . childContextTypes = {
27+ store : PropTypes . object . isRequired
28+ }
29+
3030 function stringBuilder ( prev = '' , action ) {
3131 return action . type === 'APPEND'
3232 ? prev + action . body
@@ -1184,14 +1184,14 @@ describe('React', () => {
11841184
11851185 it ( 'should hoist non-react statics from wrapped component' , ( ) => {
11861186 class Container extends Component {
1187- static howIsRedux = ( ) => 'Awesome!'
1188- static foo = 'bar'
1189-
11901187 render ( ) {
11911188 return < Passthrough />
11921189 }
11931190 }
11941191
1192+ Container . howIsRedux = ( ) => 'Awesome!'
1193+ Container . foo = 'bar'
1194+
11951195 const decorator = connect ( state => state )
11961196 const decorated = decorator ( Container )
11971197
@@ -1304,25 +1304,22 @@ describe('React', () => {
13041304 const store = createStore ( ( ) => ( { } ) )
13051305
13061306 class ImpureComponent extends Component {
1307- static contextTypes = {
1308- statefulValue : React . PropTypes . number
1309- }
1310-
13111307 render ( ) {
13121308 return < Passthrough statefulValue = { this . context . statefulValue } />
13131309 }
13141310 }
13151311
1312+ ImpureComponent . contextTypes = {
1313+ statefulValue : React . PropTypes . number
1314+ }
1315+
13161316 const decorator = connect ( state => state , null , null , { pure : false } )
13171317 const Decorated = decorator ( ImpureComponent )
13181318
13191319 class StatefulWrapper extends Component {
1320- state = {
1321- value : 0
1322- }
1323-
1324- static childContextTypes = {
1325- statefulValue : React . PropTypes . number
1320+ constructor ( ) {
1321+ super ( )
1322+ this . state = { value : 0 }
13261323 }
13271324
13281325 getChildContext ( ) {
@@ -1336,6 +1333,10 @@ describe('React', () => {
13361333 }
13371334 }
13381335
1336+ StatefulWrapper . childContextTypes = {
1337+ statefulValue : React . PropTypes . number
1338+ }
1339+
13391340 const tree = TestUtils . renderIntoDocument (
13401341 < ProviderMock store = { store } >
13411342 < StatefulWrapper />
@@ -1376,15 +1377,18 @@ describe('React', () => {
13761377 const Decorated = decorator ( ImpureComponent )
13771378
13781379 class StatefulWrapper extends Component {
1379- state = {
1380- storeGetter : { storeKey : 'foo' }
1380+ constructor ( ) {
1381+ super ( )
1382+ this . state = {
1383+ storeGetter : { storeKey : 'foo' }
1384+ }
13811385 }
1382-
13831386 render ( ) {
13841387 return < Decorated storeGetter = { this . state . storeGetter } />
13851388 }
13861389 }
13871390
1391+
13881392 const tree = TestUtils . renderIntoDocument (
13891393 < ProviderMock store = { store } >
13901394 < StatefulWrapper />
0 commit comments