Kết xuấtvi

sau_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 after-each test hook.

Syntax: sau_chuẩn_bị <block>

Category#

testing

Examples#

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

Registers an after-each test hook.

# =============================================================================
# sau_chuẩn_bị — Registers an after-each test hook.
# =============================================================================
#
# What this teaches:
#   • Test hooks — `sau_chuẩn_bị` registers cleanup logic that runs after every test case in a `đối_tượng_kiểm_thử` block.
#   • Teardown guarantee — The hook runs regardless of whether the test passes or fails.
#
# Common mistakes:
#   • Confusing `sau_chuẩn_bị` (teardown) with `chuẩn_bị` (setup) — they run at opposite ends of each test.
#
# See also: chuẩn_bị, tất_cả
# =============================================================================

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

describe "hooks" {
    teardown {
        print "after each"
    }
    test "sample" {
        assert true
    }
}