جهز
Translation status: العربية reader-locale proof. Term names and code fences follow the ar pack; supporting prose may still be English.
Registers a before-each test hook.
Syntax: جهز <block>
Category#
testing
Related#
Examples#
radix/corpus/praepara/praepara.fab (canonical · keyword)#
Registers a before-each test hook.
# =============================================================================
# جهز — Registers a before-each test hook.
# =============================================================================
#
# What this teaches:
# • Testing setup hooks — `جهز` registers a block that runs before each
# test case (`اختبر`) in the suite, ensuring shared state or side effects
# are prepared
# • Works with `لاحق` (after-each) for paired setup/teardown
#
# Common mistakes:
# • Confusing `جهز` (setup) with `لاحق` (teardown) — they run at opposite ends of each test.
#
# See also: لاحق, الكل
# =============================================================================
# جهز — before-each test hook
#
# GRAMMAR:
# hookDecl :← 'جهز' block
#
# EXPECTED OUTPUT:
# No بداية — declaration or test-runner surface only.
#
# BACKEND:
# declaration-only test hook (whitelist: جهز/praepara.fab).
#
describe "hooks" {
setup {
print "before each"
}
test "sample" {
assert true
}
}