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