-
Notifications
You must be signed in to change notification settings - Fork 218
Add the ability to add to the tearDown for a running test #93
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
Comments
Any updates on this issue? This feature would be nice to have. |
None yet. If you want to contribute though, I'd gladly take a patch! |
Cool, I'll look into it, then. Thanks! |
It would be expected that any tearDowns added inside a E.g., the following: group('', () {
tearDown(() => print('tearDown (group)');
test('', {
tearDown(() => print('tearDown (test)'));
print('test');
});
} would output:
|
That's right. If multiple tear-downs are added within a test, they should also run in last-in-first-out order. |
This is an idea that comes from
scheduled_test
. It makes it possible to create testing APIs that can clean up after themselves without the user having to explicitly pipe them to the tearDown. For example, aSandbox
class might tear down the sandbox directory;ScheduledProcess
uses this to kill dangling processes.The text was updated successfully, but these errors were encountered: