I'm trying to run cy.checkA11y to check for a specific standard and getting a lint error:
TS2345: Argument of type '{ runOnly: { type: string; values: string[]; }; }' is not assignable to parameter of type 'Options'. Object literal may only specify known properties, and 'runOnly' does not exist in type 'Options'.
If I specifically set const a11yOptions: RunOptions and then do cy.checkA11y(null, a11yOptions as Options); I don't have any eslint errors. But it seems like I shouldn't have to change the types like that.
Would making this little change to checkA11y work?
Hi,
I'm trying to run cy.checkA11y to check for a specific standard and getting a lint error:
I'm using PHPStorm 2021.2.3 package.json.
cypress eslintrc:
html:
spec test:
It correctly passes or fails the tests depending on the wcag level, but I get the error above on the runOnly section.
My axe.d.ts file has
interface RunOptions { runOnly?: RunOnly | TagValue[] | string[] | string;
and RunOnly is defined asIf I specifically set
const a11yOptions: RunOptions
and then docy.checkA11y(null, a11yOptions as Options);
I don't have any eslint errors. But it seems like I shouldn't have to change the types like that.Would making this little change to checkA11y work?
Or am I doing something really wrong in my eslint config?