@@ -215,7 +215,6 @@ describe('ReactComponentLifeCycle', () => {
215215      'StatefulComponent: It is not recommended to assign props directly to state '  + 
216216        "because updates to props won't be reflected in state. "  + 
217217        'In most cases, it is better to use props directly.' , 
218-       { withoutStack : true } , 
219218    ) ; 
220219  } ) ; 
221220
@@ -240,7 +239,6 @@ describe('ReactComponentLifeCycle', () => {
240239        'This is a no-op, but it might indicate a bug in your application. '  + 
241240        'Instead, assign to `this.state` directly or define a `state = {};` '  + 
242241        'class property with the desired state in the StatefulComponent component.' , 
243-       { withoutStack : true } , 
244242    ) ; 
245243
246244    // Check deduplication; (no extra warnings should be logged). 
@@ -271,9 +269,7 @@ describe('ReactComponentLifeCycle', () => {
271269    expect ( ( )  =>  { 
272270      const  instance  =  ReactTestUtils . renderIntoDocument ( element ) ; 
273271      expect ( instance . _isMounted ( ) ) . toBeTruthy ( ) ; 
274-     } ) . toWarnDev ( 'Component is accessing isMounted inside its render()' ,  { 
275-       withoutStack : true , 
276-     } ) ; 
272+     } ) . toWarnDev ( 'Component is accessing isMounted inside its render()' ) ; 
277273  } ) ; 
278274
279275  it ( 'should correctly determine if a null component is mounted' ,  ( )  =>  { 
@@ -300,9 +296,7 @@ describe('ReactComponentLifeCycle', () => {
300296    expect ( ( )  =>  { 
301297      const  instance  =  ReactTestUtils . renderIntoDocument ( element ) ; 
302298      expect ( instance . _isMounted ( ) ) . toBeTruthy ( ) ; 
303-     } ) . toWarnDev ( 'Component is accessing isMounted inside its render()' ,  { 
304-       withoutStack : true , 
305-     } ) ; 
299+     } ) . toWarnDev ( 'Component is accessing isMounted inside its render()' ) ; 
306300  } ) ; 
307301
308302  it ( 'isMounted should return false when unmounted' ,  ( )  =>  { 
@@ -340,9 +334,7 @@ describe('ReactComponentLifeCycle', () => {
340334
341335    expect ( ( )  =>  { 
342336      ReactTestUtils . renderIntoDocument ( < Component  /> ) ; 
343-     } ) . toWarnDev ( 'Component is accessing findDOMNode inside its render()' ,  { 
344-       withoutStack : true , 
345-     } ) ; 
337+     } ) . toWarnDev ( 'Component is accessing findDOMNode inside its render()' ) ; 
346338  } ) ; 
347339
348340  it ( 'should carry through each of the phases of setup' ,  ( )  =>  { 
@@ -408,7 +400,6 @@ describe('ReactComponentLifeCycle', () => {
408400      instance  =  ReactDOM . render ( < LifeCycleComponent  /> ,  container ) ; 
409401    } ) . toWarnDev ( 
410402      'LifeCycleComponent is accessing isMounted inside its render() function' , 
411-       { withoutStack : true } , 
412403    ) ; 
413404
414405    // getInitialState 
@@ -705,7 +696,6 @@ describe('ReactComponentLifeCycle', () => {
705696    expect ( ( )  =>  { 
706697      expect ( ( )  =>  ReactDOM . render ( < Component  /> ,  container ) ) . toWarnDev ( 
707698        'Unsafe legacy lifecycles will not be called for components using new component APIs.' , 
708-         { withoutStack : true } , 
709699      ) ; 
710700    } ) . toLowPriorityWarnDev ( 
711701      [ 
@@ -744,7 +734,6 @@ describe('ReactComponentLifeCycle', () => {
744734        ReactDOM . render ( < Component  value = { 1 }  /> ,  container ) , 
745735      ) . toWarnDev ( 
746736        'Unsafe legacy lifecycles will not be called for components using new component APIs.' , 
747-         { withoutStack : true } , 
748737      ) ; 
749738    } ) . toLowPriorityWarnDev ( 
750739      [ 
@@ -780,7 +769,6 @@ describe('ReactComponentLifeCycle', () => {
780769    const  container  =  document . createElement ( 'div' ) ; 
781770    expect ( ( )  =>  ReactDOM . render ( < Component  value = { 1 }  /> ,  container ) ) . toWarnDev ( 
782771      'Unsafe legacy lifecycles will not be called for components using new component APIs.' , 
783-       { withoutStack : true } , 
784772    ) ; 
785773    ReactDOM . render ( < Component  value = { 2 }  /> ,  container ) ; 
786774  } ) ; 
@@ -812,7 +800,6 @@ describe('ReactComponentLifeCycle', () => {
812800          '  componentWillUpdate\n\n'  + 
813801          'The above lifecycles should be removed. Learn more about this warning here:\n'  + 
814802          'https://fb.me/react-unsafe-component-lifecycles' , 
815-         { withoutStack : true } , 
816803      ) ; 
817804    } ) . toLowPriorityWarnDev ( 
818805      [ 
@@ -839,7 +826,6 @@ describe('ReactComponentLifeCycle', () => {
839826        '  UNSAFE_componentWillMount\n\n'  + 
840827        'The above lifecycles should be removed. Learn more about this warning here:\n'  + 
841828        'https://fb.me/react-unsafe-component-lifecycles' , 
842-       { withoutStack : true } , 
843829    ) ; 
844830
845831    class  WillMountAndUpdate  extends  React . Component  { 
@@ -864,7 +850,6 @@ describe('ReactComponentLifeCycle', () => {
864850          '  UNSAFE_componentWillUpdate\n\n'  + 
865851          'The above lifecycles should be removed. Learn more about this warning here:\n'  + 
866852          'https://fb.me/react-unsafe-component-lifecycles' , 
867-         { withoutStack : true } , 
868853      ) ; 
869854    } ) . toLowPriorityWarnDev ( [ 'componentWillMount has been renamed' ] ,  { 
870855      withoutStack : true , 
@@ -888,7 +873,6 @@ describe('ReactComponentLifeCycle', () => {
888873          '  componentWillReceiveProps\n\n'  + 
889874          'The above lifecycles should be removed. Learn more about this warning here:\n'  + 
890875          'https://fb.me/react-unsafe-component-lifecycles' , 
891-         { withoutStack : true } , 
892876      ) ; 
893877    } ) . toLowPriorityWarnDev ( [ 'componentWillReceiveProps has been renamed' ] ,  { 
894878      withoutStack : true , 
@@ -921,7 +905,6 @@ describe('ReactComponentLifeCycle', () => {
921905          '  componentWillUpdate\n\n'  + 
922906          'The above lifecycles should be removed. Learn more about this warning here:\n'  + 
923907          'https://fb.me/react-unsafe-component-lifecycles' , 
924-         { withoutStack : true } , 
925908      ) ; 
926909    } ) . toLowPriorityWarnDev ( 
927910      [ 
@@ -947,7 +930,6 @@ describe('ReactComponentLifeCycle', () => {
947930        '  UNSAFE_componentWillMount\n\n'  + 
948931        'The above lifecycles should be removed. Learn more about this warning here:\n'  + 
949932        'https://fb.me/react-unsafe-component-lifecycles' , 
950-       { withoutStack : true } , 
951933    ) ; 
952934
953935    class  WillMountAndUpdate  extends  React . Component  { 
@@ -971,7 +953,6 @@ describe('ReactComponentLifeCycle', () => {
971953          '  UNSAFE_componentWillUpdate\n\n'  + 
972954          'The above lifecycles should be removed. Learn more about this warning here:\n'  + 
973955          'https://fb.me/react-unsafe-component-lifecycles' , 
974-         { withoutStack : true } , 
975956      ) ; 
976957    } ) . toLowPriorityWarnDev ( [ 'componentWillMount has been renamed' ] ,  { 
977958      withoutStack : true , 
@@ -994,7 +975,6 @@ describe('ReactComponentLifeCycle', () => {
994975          '  componentWillReceiveProps\n\n'  + 
995976          'The above lifecycles should be removed. Learn more about this warning here:\n'  + 
996977          'https://fb.me/react-unsafe-component-lifecycles' , 
997-         { withoutStack : true } , 
998978      ) ; 
999979    } ) . toLowPriorityWarnDev ( [ 'componentWillReceiveProps has been renamed' ] ,  { 
1000980      withoutStack : true , 
@@ -1045,7 +1025,6 @@ describe('ReactComponentLifeCycle', () => {
10451025        "If you can't use a class try assigning the prototype on the function as a workaround. "  + 
10461026        '`Parent.prototype = React.Component.prototype`. '  + 
10471027        "Don't use an arrow function since it cannot be called with `new` by React." , 
1048-       { withoutStack : true } , 
10491028    ) ; 
10501029    ReactDOM . render ( < Parent  ref = { c  =>  c  &&  log . push ( 'ref' ) }  /> ,  div ) ; 
10511030
@@ -1074,7 +1053,6 @@ describe('ReactComponentLifeCycle', () => {
10741053    expect ( ( )  =>  ReactDOM . render ( < MyComponent  /> ,  div ) ) . toWarnDev ( 
10751054      'MyComponent.getDerivedStateFromProps(): A valid state object (or null) must '  + 
10761055        'be returned. You have returned undefined.' , 
1077-       { withoutStack : true } , 
10781056    ) ; 
10791057
10801058    // De-duped 
@@ -1097,7 +1075,6 @@ describe('ReactComponentLifeCycle', () => {
10971075        'undefined. This is not recommended. Instead, define the initial state by '  + 
10981076        'assigning an object to `this.state` in the constructor of `MyComponent`. '  + 
10991077        'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.' , 
1100-       { withoutStack : true } , 
11011078    ) ; 
11021079
11031080    // De-duped 
@@ -1366,7 +1343,6 @@ describe('ReactComponentLifeCycle', () => {
13661343    expect ( ( )  =>  ReactDOM . render ( < MyComponent  value = "bar"  /> ,  div ) ) . toWarnDev ( 
13671344      'MyComponent.getSnapshotBeforeUpdate(): A snapshot value (or null) must '  + 
13681345        'be returned. You have returned undefined.' , 
1369-       { withoutStack : true } , 
13701346    ) ; 
13711347
13721348    // De-duped 
@@ -1387,7 +1363,6 @@ describe('ReactComponentLifeCycle', () => {
13871363    expect ( ( )  =>  ReactDOM . render ( < MyComponent  /> ,  div ) ) . toWarnDev ( 
13881364      'MyComponent: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). '  + 
13891365        'This component defines getSnapshotBeforeUpdate() only.' , 
1390-       { withoutStack : true } , 
13911366    ) ; 
13921367
13931368    // De-duped 
0 commit comments