Skip to content

Global hook to handle failed tests #1630

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

Closed
rustkt opened this issue Jan 9, 2018 · 1 comment
Closed

Global hook to handle failed tests #1630

rustkt opened this issue Jan 9, 2018 · 1 comment

Comments

@rustkt
Copy link

rustkt commented Jan 9, 2018

I use ava in my project as testing framework, needs to scaffold the processing of errors.

Can ava add an error handler globally (across all test files), triggered if each test fails?

@novemberborn
Copy link
Member

Any hooks need to be registered in each test file, but you could do that in a helper script and include it via the require option in the AVA's package.json configuration.

However you can't currently access the test status from such hooks. We're open to that feature though, see #840.

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

No branches or pull requests

2 participants