cypress-io/cypress-react-unit-test

Upgrading from 4.7.1 -> 4.7.2 breaks support file import

Closed this issue · 3 comments

Potential regression? Maybe I'm misusing support files?

On 4.7.1
image

On 4.7.2+

Error: Webpack Compilation Error
./cypress/integration/allRoutes.test.ts
Module not found: Error: You attempted to import ../support/getLoggedInUser which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.
 @ ./cypress/integration/allRoutes.test.ts 949:23-60
 @ multi ./cypress/integration/allRoutes.test.ts

My attempted import is:
image

This is the contents of the /support directory in relation to /integration

image

Will try any suggested fixes. Missing out on new updates :(

Also what's bizarre to me is I'm not importing anything from cypress-react-unit-test within the test that's failing due to this import error. So why is this library effecting an integration test that doesn't import anything from this library. Makes me think I might be making a mistake?

Thank's for any advice / suggestions.

Could you try using the latest version of this package?

closing as hopefully resolved