StackOverflow Questions for Tag: react-testing-library

Charlie Maloney
Charlie Maloney

Reputation: 161

How to mock a react function component that takes a ref prop?

Score: 16

Views: 13314

Answers: 3

Read More
John
John

Reputation: 3789

Testing AG Grid with React Testing Library & Jest - not working

Score: 0

Views: 12

Answers: 0

Read More
Prajwal Kulkarni
Prajwal Kulkarni

Reputation: 1705

`usePathname` returning `null` despite mocking the return value - vitest

Score: 0

Views: 51

Answers: 0

Read More
vatsal chauhan
vatsal chauhan

Reputation: 99

How to test a loading screen in vitest

Score: 0

Views: 30

Answers: 1

Read More
CodeG
CodeG

Reputation: 467

Jest TypeError: Cannot read property of null

Score: 1

Views: 9929

Answers: 1

Read More
Hacker rocker1169
Hacker rocker1169

Reputation: 83

Unable to write unit test cases for FHIR client api calls

Score: 0

Views: 518

Answers: 1

Read More
bakrall
bakrall

Reputation: 633

How to test shift+tab key press in React Testing Library?

Score: 0

Views: 597

Answers: 2

Read More
BobtheMagicMoose
BobtheMagicMoose

Reputation: 2439

How can I mock an image with React testing library?

Score: 0

Views: 726

Answers: 1

Read More
AAMCODE
AAMCODE

Reputation: 515

React Testing Library: UserEvent.type not working

Score: 11

Views: 22233

Answers: 1

Read More
jaypee
jaypee

Reputation: 2147

How to mock socket.io-client using jest/react-testing-library

Score: 5

Views: 11713

Answers: 5

Read More
Nishant Pandya
Nishant Pandya

Reputation: 15

How to make NextJS 15 dynamic CSS generation blank?

Score: 0

Views: 25

Answers: 0

Read More
3gwebtrain
3gwebtrain

Reputation: 15305

Ensuring the correct drop down option selected from multiple select elements available

Score: -2

Views: 44

Answers: 1

Read More
TheSoul
TheSoul

Reputation: 5376

SyntaxError: Missing initializer in const declaration

Score: 20

Views: 40278

Answers: 3

Read More
Petrando Richard
Petrando Richard

Reputation: 31

cannot detect installed react-router-dom package when running unit tests

Score: 1

Views: 841

Answers: 2

Read More
Haitam-Elgharras
Haitam-Elgharras

Reputation: 138

React Testing Library Fails to Detect :hover Styles in MUI Styled Components

Score: 0

Views: 25

Answers: 1

Read More
D.Hodges
D.Hodges

Reputation: 2107

Why is the mock in my React unit test returning null

Score: -1

Views: 47

Answers: 1

Read More
subharb
subharb

Reputation: 3472

ReferenceError: crypto is not defined

Score: 3

Views: 9083

Answers: 2

Read More
Attila
Attila

Reputation: 1177

How can I display a custom error message when a Jest snapshot test fails?

Score: 1

Views: 20

Answers: 0

Read More
Berkeli
Berkeli

Reputation: 454

Cannot test custom hooks with React 18 and renderHook from testing-library/react

Score: 8

Views: 17566

Answers: 5

Read More
Peter
Peter

Reputation: 330

Testing styled components from @emotion/styled with vitest

Score: 0

Views: 53

Answers: 0

Read More
PreviousPage 1Next