python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Issues with mock + multiple exports in the same file on react-testing-library
I am using Jest + React Testing Library in my project, and in one of my components, I have a common index.ts that exports all the internal components like:
src/components/commonComponents/index.ts:
im...
Gabrielle
Votes: 0
Answers: 0
Get error module not found in component file
I'm trying to write unit test. I just import my component file inside test.file. When trying run test. It gives error module not found for file import in file component, while in file component the im...
syareen
Votes: 0
Answers: 1
React testing library can't find element after click
I enter password and username wrongly on the application and I get an alert. But when I try to test this I can't find the element after click action. I tried to use waitfor to wait for the dom to rere...
FaFa
Votes: 0
Answers: 0
How to test scrollHeight, scrollWidth, clientHeight and clientWidth with react-testing-library and jest
I just can't figure out, how I'm supposed to mock / get data from scrollHeight, scrollWidth, clientHeight and clientWidth in test.
For better introduction, my task is to detect whether table element i...
Pinnci
Votes: 0
Answers: 0