async_teardown
Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.
Registers an async after-each test hook.
Syntax: async_teardown <block>
Category#
testing
Related#
Examples#
radix/corpus/postparabit/postparabit.fab (canonical · keyword)#
Registers an async after-each test hook.
# =============================================================================
# async_teardown — Registers an async after-each test hook.
# =============================================================================
#
# What this teaches:
# • Async test hooks — `async_teardown` registers an async cleanup hook that runs after each test case.
# • Async counterpart — Pairs with `async_setup` (async before-each) and mirrors `teardown` (sync after-each).
#
# Common mistakes:
# • Confusing `async_teardown` (async teardown) with `async_setup` (async setup) — they run at opposite ends of each test.
#
# See also: teardown, async_setup
# =============================================================================
# async_teardown — async after-each hook
#
# GRAMMAR:
# hookDecl :← 'async_teardown' block
#
# EXPECTED OUTPUT:
# No main — declaration or test-runner surface only.
#
# BACKEND:
# declaration-only test hook (whitelist: async_teardown/postparabit.fab).
#
describe "async hooks" {
async_teardown {
print "after each async"
}
test "sample" {
assert true
}
}