Attempts to update axe-core from 3.1.2 to 3.2.0 are causing Cypress tests to fail. From the error message, it looks like it can't resolve axios anymore?
Expectation: no errors
Actual: Error: Cannot find module './lib/axios' from '/root/project/node_modules/axe-core'
Motivation: N/A
axe-core version: 3.2.0
axe-webdriver, extension or other integration version: N/A
Browser and Assistive Technology versions
For Tooling issues:
- Node version: 10
- Platform: all
Thanks.
Thank you for reporting. Looking into it now.
@wKovacs64 @beardedtim looks like this problem is coming form Cypress being unexpectedly aggressive in overloading any variable called require. Axe-core uses an internal require to load its embedded dependencies.
A simple workaround I found is to use axe.min.js instead of axe.js. You can require it from axe-core/axe.min.js.
I'll put together a fix for this. Shouldn't be too difficult, just have to rename that require function.
Thanks @WilcoFiers & crew!
Most helpful comment
@wKovacs64 @beardedtim looks like this problem is coming form Cypress being unexpectedly aggressive in overloading any variable called
require. Axe-core uses an internalrequireto load its embedded dependencies.A simple workaround I found is to use axe.min.js instead of axe.js. You can require it from
axe-core/axe.min.js.I'll put together a fix for this. Shouldn't be too difficult, just have to rename that
requirefunction.