component-driven / cypress-axe

Test accessibility with axe-core in Cypress
MIT License
622 stars 86 forks source link

ReferenceError: require is not defined #170

Open linediconsine opened 10 months ago

linediconsine commented 10 months ago

Hi and thanks for develop and maintaining cypress-axe, I see an error with this versions

 "cypress-axe": "^1.5.0",
  "cypress": "^13.6.1",
  "axe-core": "^4.8.2",

Accessibility test are failing with

 [positive] Loader component should have no accessibility violations:

ReferenceError: require is not defined
at exports.injectAxe (http://localhost:6060/__cypress/tests?p=test/integration/support/index.ts:27:190)

I created this patch https://github.com/component-driven/cypress-axe/pull/169

That seem to solve the problem

aneta-kjeldsen commented 6 months ago

I'm experiencing the same error. Is it possible to merge the PR with the fix.