exploration icon indicating copy to clipboard operation
exploration copied to clipboard

Difficulty rendering for Testing Library test

Open jsphstls opened this issue 3 years ago • 2 comments

Describe the bug I am unable to render any nodes for the purpose of automated testing.

To Reproduce https://codesandbox.io/s/basic-example-forked-rx85dd?file=/src/App.test.js

Expected behavior Nodes should eventually render yet no amount of delay or async trickery in the test causes them to appear.

Additional context https://testing-library.com/docs/react-testing-library/intro/ is quite common though there are plenty of other options. I know this repo has loads of tests for the underlying functionality but I did not see any e2e test from which to adapt my own test.

Thank you for creating this package. The level of detail is super impressive.

jsphstls avatar Aug 16 '22 13:08 jsphstls

I'll have a look tomorrow if you haven't figured this out already

jaredLunde avatar Aug 18 '22 21:08 jaredLunde

Nothing new from me. My backup plan is to use Cypress though I still hope to have a test using only RTL and Jest.

While attempting the first test I did fiddle with act, useFakeTimers, and a few tricks around promises to no success.

jsphstls avatar Aug 18 '22 21:08 jsphstls