DEV Community

Discussion on: Why testing-library fails to do what it set out to do

Collapse
 
vonheikemen profile image
Heiker • Edited

But to sum up, you say we should bundle jest and all test files, open in a browser, and it should work with react-testing-library as long as it's bundled with it?

Oh no. Heavens no! That's not what I'm saying. Jest is a monster of a framework, I don't think you can make it run in a browser. I'm just trying to defend the testing-library family here.

Do you use pptr-testing-library with puppeteer?

Thread Thread
 
rangeoshun profile image
Abel Varga

Nope, we created a test suite with cucumber-js and a lot of custom steps to support Gherkin for our PMs and non-technical staff.

Does it allow to run @testing-library/react based tests in Puppeteer?

Because I'm under the impression, they won't work together like that, and that's where I may be wrong.

Thread Thread
 
vonheikemen profile image
Heiker

Does it allow to run @testing-library/react based tests in Puppeteer?

No. pptr-testing-library was made to control puppeteer. So, technically puppeteer will render your app, then you use pptr-testing-library to query and manipulate the DOM (just like you would with react-testing-library).

Thread Thread
 
rangeoshun profile image
Abel Varga

Thanks! That's what I thought. What I would like ultimately, is my unit-tests to run in an actual browser.