Skip to content

after won't run when uncaught exception thrown #805

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
cgcgbcbc opened this issue May 3, 2016 · 1 comment
Closed

after won't run when uncaught exception thrown #805

cgcgbcbc opened this issue May 3, 2016 · 1 comment

Comments

@cgcgbcbc
Copy link
Contributor

cgcgbcbc commented May 3, 2016

Description

import test from 'ava';

test.after(t => {
  console.log('after');
});

test(t => {
  throw 'error';
});

after hook won't execute in this situation, if database need to be clean in after hook, then it will not be cleaned and future test will fail due to unclean database.

Environment

node version v5.5.0, gulp-ava version 0.11.0, ava version latest

@sindresorhus
Copy link
Member

See: #474

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