Open mellis481 opened 3 years ago
I'm using the violationCallback parameter of cy.checkA11y() to implement custom logging. Like this:
violationCallback
cy.checkA11y()
cy.checkA11y(undefined, undefined, showViolations); const showViolations = (violations: Result[]) => { violations.forEach((violation: Result) => { const { nodes, helpUrl, help, impact } = violation; const nodesList = nodes.map((node: NodeResult) => node.target).join(', '); const name = `${impact || ''} a11y error`; const message = `[${help}](${helpUrl}) affecting the following node(s): [${nodesList}]. Check the console for additional error details.`; Cypress.log({ name, message, consoleProps: () => violation, $el: Cypress.$(nodesList), }); }); };
When I do this, I see my custom logs followed by the standard output. Eg:
I don't want to see the standard output if I have custom logging in place. How can I accomplish this?
I'm using the
violationCallback
parameter ofcy.checkA11y()
to implement custom logging. Like this:When I do this, I see my custom logs followed by the standard output. Eg:
I don't want to see the standard output if I have custom logging in place. How can I accomplish this?