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

Function useValue

src/__tests__/resultHistory.test.ts:2–7  ·  view source on GitHub ↗
(value: number)

Source from the content-addressed store, hash-verified

1describe('result history tests', () => {
2 function useValue(value: number) {
3 if (value === 2) {
4 throw Error('expected')
5 }
6 return value
7 }
8
9 runForRenderers(['default', 'dom', 'native'], ({ renderHook }) => {
10 test('should capture all renders states of hook', () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…