Questions tagged [jestjs]

Jest is a JavaScript unit testing framework made by Facebook that's based on Jasmine and provides automated mock creation, and a jsdom environment. It's often used for testing React components.

0
votes
1answer
69 views

How to wait till next page opens after a button click in Jest + TypeScript?

I want to pass or fail the tests of "Login" function based on fields available on the second page. I used "xpath" to capture the fields. But it does not capture the fields of the second page. I ...
5
votes
1answer
2k views

Is there a way to run a subset of tests using Jest?

I would like to be able to run a subset of it's or describe's in a Jasmine test file using jest with some type of tagging system. I know I can indicate a filter of sorts by using a word after the ...
2
votes
1answer
3k views

Wait for element change not present (WebDriver/JavaScript/Jest)

Yesterday I struggled with waiting for a loading indicator to be removed. Added this question and answer here because we spend a lot of time on it and Google didn't help much. Hopefully this will help ...
1
vote
1answer
2k views

Rerun failed (flaky) tests with Jest

We are using Jest as our test runner for our JavaScript (React and Selenium) tests. We have one or two flaky tests (as TeamCity marks them flaky and we process them as technical-debt), although we ...