File tree 2 files changed +7
-0
lines changed 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ describe('React', () => {
30
30
const propTypes = Provider . propTypes
31
31
Provider . propTypes = { }
32
32
33
+ const spy = jest . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } )
34
+
33
35
try {
34
36
expect ( ( ) => TestUtils . renderIntoDocument (
35
37
< Provider store = { store } >
@@ -50,6 +52,7 @@ describe('React', () => {
50
52
) ) . 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 / )
51
53
} finally {
52
54
Provider . propTypes = propTypes
55
+ spy . mockRestore ( )
53
56
}
54
57
} )
55
58
Original file line number Diff line number Diff line change @@ -1546,6 +1546,8 @@ describe('React', () => {
1546
1546
} )
1547
1547
1548
1548
it ( 'should throw an error if the store is not in the props or context' , ( ) => {
1549
+ const spy = jest . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } )
1550
+
1549
1551
class Container extends Component {
1550
1552
render ( ) {
1551
1553
return < Passthrough />
@@ -1560,6 +1562,8 @@ describe('React', () => {
1560
1562
) . toThrow (
1561
1563
/ C o u l d n o t f i n d " s t o r e " /
1562
1564
)
1565
+
1566
+ spy . mockRestore ( )
1563
1567
} )
1564
1568
1565
1569
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