()
| 68 | } |
| 69 | |
| 70 | function failTestOnConsoleWarn() { |
| 71 | const warn = console.warn; |
| 72 | |
| 73 | console.warn = function (message) { |
| 74 | const allowedPattern = |
| 75 | typeof message === 'string' && |
| 76 | WARNING_PATTERNS_WE_SHOULD_FIX_BUT_ALLOW.find(pattern => matchesPattern(message, pattern)); |
| 77 | |
| 78 | if (allowedPattern) { |
| 79 | return; |
| 80 | } |
| 81 | |
| 82 | warn.apply(console, arguments); |
| 83 | throw message instanceof Error ? message : new Error(message); |
| 84 | }; |
| 85 | } |
| 86 | |
| 87 | expect.extend({ |
| 88 | toContainObject(received, argument) { |
no test coverage detected