repeat
Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.
Repeats a test a fixed number of times.
Syntax: repeat <number>
Category#
testing
Related#
Examples#
radix/corpus/repete/repete.fab (canonical · keyword)#
Repeats a test a fixed number of times.
# =============================================================================
# repeat — Repeats a test a fixed number of times.
# =============================================================================
#
# What this teaches:
# • Test flakiness mitigation — `repeat <N>` runs a test case up to N times
# until it passes; useful for non-deterministic or flaky tests
# • Declared as a test modifier on `test`
#
# Common mistakes:
# • Confusing `repeat` (test repetition modifier) with `for` (loop iterator) or `do`/`while` (loop constructs).
#
# See also: flaky
# =============================================================================
# repeat — repeat test modifier
#
# GRAMMAR:
# testModifier :← 'repeat' integer
#
# EXPECTED OUTPUT:
# No main — declaration or test-runner surface only.
#
# BACKEND:
# declaration-only test modifier (whitelist: repeat/repete.fab).
#
test "flaky guard" repeat 2 {
assert true
}