it’s my first testing with Cypress, i’m currently using Nextjs. We’ve recently created our own component library and made it a package, so we can use it in any other projects.
I was using JEST and everything was working fine, until we needed to migrate to Cypress.
You can see my files in the screenshot below
I tried installing Cypress as per the nextjs documentation.
But whenever i try running tests on any component is fails and it gives me this error
Module build failed (from ./node_modules/next/dist/build/babel/loader/index.js): Error: The Next.js Babel loader does not support .mjs or .cjs config files. at getCustomBabelConfig
N.B: We need our files extension to be .mjs and .cjs as we’re using them in our rollup to create the package.
Even whenever I try creating tests from Cypress dashboard, it says unable to parse file
I’ve tried changing my nextconfig from mjs to js, same thing for babel, but still doesn’t work.
While using the create form component, i cannot access any component..