Renderingen-US

describe

Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.

Groups related test cases into a named suite.

Aliases: describe, suite

Syntax: describe <name> [modifiers] <block>

Category#

testing

Examples#

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

Groups related test cases into a named suite.

# =============================================================================
# describe — Groups related test cases into a named suite.
# =============================================================================
#
# What this teaches:
#   • Test suite grouping — `describe` organizes related `test` test cases
#     under a descriptive name
#   • Suites can be nested to create hierarchical test organization
#
# Common mistakes:
#   • Placing `test` outside a `describe` suite, or forgetting a `tag` modifier on the test case.
#
# See also: test, assert
# =============================================================================

# describe / test — declaration-only test suites
#
# describe "name" { test "case" { assert expr } … }   -- test group
# describe "nested" { describe "inner" { … } }         -- nested suite
#
# GRAMMAR:
#   probandumDecl :← 'describe' stringLit block
#   probaDecl     :← 'test' stringLit block
#
# EXPECTED OUTPUT:
#   No stdout — assert cases produce no print output when run as tests.
#
# BACKEND: No main block — test-runner surface; exempla e2e whitelists as
# declaration-only (whitelist: describe/probandum.fab).

describe "arithmetica" {
    test "unum plus unum" {
        assert 1 + 1 ≡ 2
    }

    test "multiplicatio" {
        assert 3 * 4 ≡ 12
    }

    describe "implicata" {
        test "comparatio" {
            const _ x ← 10
            assert x ≥ 10
        }
    }
}