العرضar

سيهيئ

Translation status: العربية reader-locale proof. Term names and code fences follow the ar pack; supporting prose may still be English.

Registers an async before-each test hook.

Syntax: سيهيئ <block>

Category#

testing

Examples#

radix/corpus/praeparabit/praeparabit.fab (canonical · keyword)#

Registers an async before-each test hook.

# =============================================================================
# سيهيئ — Registers an async before-each test hook.
# =============================================================================
#
# What this teaches:
#   • Async test setup — `سيهيئ` registers an async block that runs before
#     each test case, used when setup involves I/O or future-based operations
#   • Async counterpart of `جهز`; paired with `سيلحق` for async
#     setup/teardown
#
# Common mistakes:
#   • Confusing `سيهيئ` (async setup) with `سيلحق` (async teardown) — they run at opposite ends of each test.
#
# See also: جهز, سيلحق
# =============================================================================

# سيهيئ — async before-each hook
#
# GRAMMAR:
#   hookDecl :← 'سيهيئ' block
#
# EXPECTED OUTPUT:
#   No بداية — declaration or test-runner surface only.
#
# BACKEND:
#   declaration-only test hook (whitelist: سيهيئ/praeparabit.fab).
#

describe "async hooks" {
    async_setup {
        print "before each async"
    }
    test "sample" {
        assert true
    }
}