DEV Community

Discussion on: How to test your relay components with relay-test-utils and react-testing-library

Collapse
 
simkessy profile image
simkessy

yea I get the same error, an answer would be nice.

Collapse
 
arnarkari_ profile image
Arnar Kári Ágústsson

I use createMockEnvironment from react-test-utils. Then I create a barebone component in my tests using QueryRenderer that wraps the component that I am testing, passing the fragment reference down. It's a bit of boilerplate code.