Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add custom result handler #20

Merged
merged 3 commits into from
Apr 22, 2020
Merged

feat: add custom result handler #20

merged 3 commits into from
Apr 22, 2020

Conversation

DesselBane
Copy link

Hi there

Which problems does this PR solve?

If the results of an axe.run() should be handled in a custom way this is currently not possible.

More Context

I'm currently trying to integrate this library with my cypress e2e tests. Now in case of axe validation errors they are outputted to the console but there is no easy way to make the tests fail and output it to the cypress log.

Why use this implementation?

By implementing the resultHandler as an optional callback nothing of the original functionality is lost which means no breaking change. Also this ways anyone who wants to can handle the results the way he needs to

@ktquez
Copy link
Member

ktquez commented Apr 21, 2020

Hello @DesselBane, how are you?

I really enjoyed this possibility to customize the log, thank you very much for this contribution.

Could you add in the documentation (README) this new option and put your use case as an example?

@DesselBane
Copy link
Author

updated the documentation

@ktquez ktquez merged commit 73883e9 into vue-a11y:master Apr 22, 2020
@ktquez
Copy link
Member

ktquez commented Apr 22, 2020

@DesselBane Done!

Now available in v1.1.0
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants