File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ describe('React', () => {
3030 const propTypes = Provider . propTypes
3131 Provider . propTypes = { }
3232
33+ const spy = jest . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } )
34+
3335 try {
3436 expect ( ( ) => TestUtils . renderIntoDocument (
3537 < Provider store = { store } >
@@ -50,6 +52,7 @@ describe('React', () => {
5052 ) ) . toThrow ( / a s i n g l e R e a c t e l e m e n t c h i l d / )
5153 } finally {
5254 Provider . propTypes = propTypes
55+ spy . mockRestore ( )
5356 }
5457 } )
5558
Original file line number Diff line number Diff line change @@ -1546,6 +1546,8 @@ describe('React', () => {
15461546 } )
15471547
15481548 it ( 'should throw an error if the store is not in the props or context' , ( ) => {
1549+ const spy = jest . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } )
1550+
15491551 class Container extends Component {
15501552 render ( ) {
15511553 return < Passthrough />
@@ -1560,6 +1562,8 @@ describe('React', () => {
15601562 ) . toThrow (
15611563 / C o u l d n o t f i n d " s t o r e " /
15621564 )
1565+
1566+ spy . mockRestore ( )
15631567 } )
15641568
15651569 it ( 'should throw when trying to access the wrapped instance if withRef is not specified' , ( ) => {
You can’t perform that action at this time.
0 commit comments