MCPcopy
hub / github.com/testing-library/react-hooks-testing-library / suppressErrorOutput

Function suppressErrorOutput

src/core/console.ts:6–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4]
5
6function suppressErrorOutput() {
7 const originalError = console.error
8
9 const error = (...args: Parameters<typeof originalError>) => {
10 const message = typeof args[0] === 'string' ? args[0] : null
11 if (!message || !consoleFilters.some((filter) => filter.test(message))) {
12 originalError(...args)
13 }
14 }
15
16 console.error = error
17
18 return () => {
19 console.error = originalError
20 }
21}
22
23function errorFilteringDisabled() {
24 try {

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…