StackOverflow Questions for Tag: react-hooks-testing-library

Srigar
Srigar

Reputation: 1688

How to set initial state for useState Hook in jest and enzyme?

Score: 44

Views: 203986

Answers: 11

Read More
mehran
mehran

Reputation: 1476

testing-library/react-hooks calling a function that change the state

Score: 0

Views: 255

Answers: 1

Read More
user938363
user938363

Reputation: 10378

TypeError: navigation.navigate is not a function in jest

Score: 1

Views: 2549

Answers: 2

Read More
Eric
Eric

Reputation: 1165

Testing hooks which throw errors

Score: 4

Views: 8650

Answers: 2

Read More
Prajwal Raj
Prajwal Raj

Reputation: 53

not able to install react-google-login

Score: 0

Views: 528

Answers: 2

Read More
user10741122
user10741122

Reputation: 891

How to use react-testing-library and jest with mocked custom react hook updating?

Score: 2

Views: 5621

Answers: 1

Read More
Tony96
Tony96

Reputation: 41

How can I test two different GET queries in the same React custom hook using react testing library and react-hooks?

Score: 0

Views: 857

Answers: 2

Read More
CodeMonkey
CodeMonkey

Reputation: 12444

Testing a custom hook with renderHook

Score: 5

Views: 9834

Answers: 2

Read More
Quinton
Quinton

Reputation: 11

react-hooks-testing-library: Context Provider, state change in child function act() error

Score: 1

Views: 393

Answers: 0

Read More
user901916
user901916

Reputation: 63

React Testing Library - mock offsetWidth, offsetLeft

Score: 0

Views: 1266

Answers: 1

Read More
glengomerson
glengomerson

Reputation: 51

How to test this window resize hook?

Score: 0

Views: 287

Answers: 0

Read More
heliosk
heliosk

Reputation: 1159

React testing custom hook with window.url

Score: 1

Views: 333

Answers: 1

Read More
rchgupta
rchgupta

Reputation: 99

result.current is null when using renderHook () Custom Hook to test custom hook in react-native using jest and testing-library

Score: 4

Views: 4098

Answers: 1

Read More
BlackWhite
BlackWhite

Reputation: 832

How can I test useEffect with async function in Jest?

Score: 0

Views: 285

Answers: 0

Read More
jeyremd
jeyremd

Reputation: 199

result.current.data is undefined when I declare renderHook into the test closure but works when it is defined outside of it

Score: 0

Views: 970

Answers: 0

Read More
Scott
Scott

Reputation: 442

Using react-hooks-testing-library with jest.spyOn - spy is not called

Score: 13

Views: 18252

Answers: 3

Read More
Martin Rützy
Martin Rützy

Reputation: 525

What is the suitable type for renderHook in react-testing-library and TypeScript?

Score: 4

Views: 8240

Answers: 2

Read More
Sasha Omelchenko
Sasha Omelchenko

Reputation: 306

React Testing Library merged with @testing-library/react-hooks, wrapper inconsistent in renderHook

Score: 4

Views: 2934

Answers: 1

Read More
tpee
tpee

Reputation: 891

How can i query the result of the hook response?

Score: 1

Views: 211

Answers: 1

Read More
ludinj
ludinj

Reputation: 115

Testing custom hooks react typescript

Score: 1

Views: 2026

Answers: 1

Read More
PreviousPage 1Next