NAME

Test2::Tools::AfterSubtest - Test2 after_subtest callback

DESCRIPTION

Exports an after_subtest function that can be passed a callback to be executed after every subtest.

Useful for things like cleaning up the database after each test.

SYNOPSIS

use Test2::Bundle::More;
use Test2::Tools::AfterSubtest;
after_subtest(sub {
  diag 'Subtest has finished;
});
subtest 'test' => sub {
  ok('subtest runs');
};