DEV Community

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

Collapse
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 https://github.com/bahmutov/cypress-react-unit-test#install please

PS: thanks in advance.

Collapse
koalamango profile image
Jessie W.

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