渲染zh-Hant

postpara

Translation status: 繁體中文 reader-locale proof. Code fences render through the zh-Hant pipeline; prose is canonical Latin.

Registers an after-each test hook.

Syntax: postpara <block>

Category#

testing

Examples#

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

Registers an after-each test hook.

# =============================================================================
# postpara — Registers an after-each test hook.
# =============================================================================
#
# What this teaches:
#   • Test hooks — `postpara` registers cleanup logic that runs after every test case in a `probandum` block.
#   • Teardown guarantee — The hook runs regardless of whether the test passes or fails.
#
# Common mistakes:
#   • Confusing `postpara` (teardown) with `praepara` (setup) — they run at opposite ends of each test.
#
# See also: praepara, omnia
# =============================================================================

# postpara — after-each test hook
#
# GRAMMAR:
#   hookDecl :← 'postpara' block
#
# EXPECTED OUTPUT:
#   No incipit — declaration or test-runner surface only.
#
# BACKEND:
#   declaration-only test hook (whitelist: postpara/postpara.fab).
#

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