| Total Complexity | 4 |
| Complexity/F | 1.33 |
| Lines of Code | 13 |
| Function Count | 3 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | const originalConsoleError = global.console.error; |
||
| 2 | |||
| 3 | beforeEach(() => { |
||
| 4 | global.console.error = (...args) => { |
||
| 5 | const propTypeFailures = [/Failed prop type/, /Warning: Received/]; |
||
| 6 | |||
| 7 | if (propTypeFailures.some((p) => p.test(args[0]))) { |
||
| 8 | throw new Error(args[0]); |
||
| 9 | } |
||
| 10 | |||
| 11 | originalConsoleError(...args); |
||
| 12 | }; |
||
| 13 | }); |
||
| 14 |