การเรนเดอร์th-TH

หลังเตรียม

Translation status: ภาษาไทย reader-locale proof. Term names and code fences follow the th-TH pack; supporting prose may still be English.

Registers an after-each test hook.

Syntax: หลังเตรียม <block>

Category#

testing

Examples#

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

Registers an after-each test hook.

# =============================================================================
# หลังเตรียม — Registers an after-each test hook.
# =============================================================================
#
# What this teaches:
#   • Test hooks — `หลังเตรียม` registers cleanup logic that runs after every test case in a `ทดสอบชุด` block.
#   • Teardown guarantee — The hook runs regardless of whether the test passes or fails.
#
# Common mistakes:
#   • Confusing `หลังเตรียม` (teardown) with `เตรียม` (setup) — they run at opposite ends of each test.
#
# See also: เตรียม, ทั้งหมด
# =============================================================================

# หลังเตรียม — after-each test hook
#
# GRAMMAR:
#   hookDecl :← 'หลังเตรียม' block
#
# EXPECTED OUTPUT:
#   No เริ่ม — declaration or test-runner surface only.
#
# BACKEND:
#   declaration-only test hook (whitelist: หลังเตรียม/postpara.fab).
#

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