Kết xuấtvi

sẽ_chuẩn_bị

Translation status: Tiếng Việt reader-locale proof. Term names and code fences follow the vi pack; supporting prose may still be English.

Registers an async before-each test hook.

Syntax: sẽ_chuẩn_bị <block>

Category#

testing

Examples#

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

Registers an async before-each test hook.

# =============================================================================
# sẽ_chuẩn_bị — Registers an async before-each test hook.
# =============================================================================
#
# What this teaches:
#   • Async test setup — `sẽ_chuẩn_bị` registers an async block that runs before
#     each test case, used when setup involves I/O or future-based operations
#   • Async counterpart of `chuẩn_bị`; paired with `sẽ_sau_chuẩn_bị` for async
#     setup/teardown
#
# Common mistakes:
#   • Confusing `sẽ_chuẩn_bị` (async setup) with `sẽ_sau_chuẩn_bị` (async teardown) — they run at opposite ends of each test.
#
# See also: chuẩn_bị, sẽ_sau_chuẩn_bị
# =============================================================================

# sẽ_chuẩn_bị — async before-each hook
#
# GRAMMAR:
#   hookDecl :← 'sẽ_chuẩn_bị' block
#
# EXPECTED OUTPUT:
#   No bắt_đầu — declaration or test-runner surface only.
#
# BACKEND:
#   declaration-only test hook (whitelist: sẽ_chuẩn_bị/praeparabit.fab).
#

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