Load specs from node_modules in cypress v10

Viewed 28

I'm upgrading Cypress in a quite large corporate project. Currently stuck on importing specs using specPattern. Cypress is run in different repo and package than the specs are, so we are publishing the specs as a part of the package and they are available in node_modules.

When opening cypress, current working dir seems to be the root of the repo. So to access node_modules one could use ./node_modules or just node_modules. But when using ./node_modules/.../e2e/*.* as specPattern, Cypress fails to discover the specs. They are, however, available if I create symlink at the same level, next to node_modules. So to me, it seems like node_modules is excluded or unavailable to cypress.

How to make cypress discover the specs given the path to node_modules project?

0 Answers
Related