Skip to content

Resolved path for axe.min.js incorrect when using Cypress Component Testing (with Vite) and npm workspaces  #146

@dhulme

Description

@dhulme

cypress-axe uses require.resolve to generate the path to axe-core/axe.min.js. Vite does not implement require.resolve (see vitejs/vite#4385) so cypress-axe falls back to node_modules/axe-core/axe.min.js for the location. This works fine in normal circumstances, but fails if the node_modules directory is at a different level, for example when using npm workspaces.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions