DEV Community

Discussion on: Test React Component with cypress-react-unit-test Example

samalasumanth0262 profile image
Samala Sumanth • Edited

Hey, The blog is great and explanation is so simple and accurate..
i got struck here while i execute the npx cypress open. is it supported by create-react-app or should i eject it and do webpack config separately? cypress browser says

[cypress-react-unit-test] 🔥 Hmm, cannot find root element to mount the component. Did you forget to include the support file? Check please

PS: thanks in advance.

koalamango profile image
Jessie W.

add import "cypress-react-unit-test/support"; to cypress/support/index.js