You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am creating a new issue for #7 as the original owner closed it despite the issue not being resolved. If you are having issues getting cypress-axe to work with Typescript/Webpack, please look at that issue for solutions.
The text was updated successfully, but these errors were encountered:
I ran into this issue. After digging into it, I have no idea why eval is used in the original script. This is my workaround:
support/commands.ts
import*asaxefrom'axe-core';declare global {interfaceWindow{axe: typeofaxe}}Cypress.Commands.add('injectAxe',()=>{cy.window({log: false}).then(window=>{window.axe=axe;})})
This will simply assign the value returned by the import rather than running eval on the source (which is already done by the import...)
I'll open a PR to this repo since this should work for both browserify and webpack.
I am creating a new issue for #7 as the original owner closed it despite the issue not being resolved. If you are having issues getting cypress-axe to work with Typescript/Webpack, please look at that issue for solutions.
The text was updated successfully, but these errors were encountered: