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

Function throwError

src/__tests__/errorHook.test.ts:4–8  ·  view source on GitHub ↗
(shouldThrow?: boolean)

Source from the content-addressed store, hash-verified

2
3describe('error hook tests', () => {
4 function throwError(shouldThrow?: boolean) {
5 if (shouldThrow) {
6 throw new Error('expected')
7 }
8 }
9
10 runForRenderers(['default', 'dom', 'native', 'server/hydrated'], ({ renderHook }) => {
11 describe('synchronous', () => {

Callers 3

useErrorFunction · 0.85
useAsyncErrorFunction · 0.85
useEffectErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…