praeparabit
Translation status: العربية reader-locale proof. Code fences render through the ar pipeline; prose is canonical Latin.
Registers an async before-each test hook.
Syntax: praeparabit <block>
Category#
testing
Related#
Examples#
radix/corpus/praeparabit/praeparabit.fab (canonical · keyword)#
Registers an async before-each test hook.
# =============================================================================
# praeparabit — Registers an async before-each test hook.
# =============================================================================
#
# What this teaches:
# • Async test setup — `praeparabit` registers an async block that runs before
# each test case, used when setup involves I/O or future-based operations
# • Async counterpart of `praepara`; paired with `postparabit` for async
# setup/teardown
#
# Common mistakes:
# • Confusing `praeparabit` (async setup) with `postparabit` (async teardown) — they run at opposite ends of each test.
#
# See also: praepara, postparabit
# =============================================================================
# praeparabit — async before-each hook
#
# GRAMMAR:
# hookDecl :← 'praeparabit' block
#
# EXPECTED OUTPUT:
# No incipit — declaration or test-runner surface only.
#
# BACKEND:
# declaration-only test hook (whitelist: praeparabit/praeparabit.fab).
#
describe "async hooks" {
async_setup {
print "before each async"
}
test "sample" {
assert true
}
}