Suites with @suite
When several tests share context or describe the same component, group them in
a module annotated with @suite("name"). The runner displays results
hierarchically, making failures easier to read.
Suites can be nested: a child module inside the parent module inherits the scope and is displayed as a subgroup:
Runs via zolo test. Shows a root suite default_state with a nested
sub-suite when empty inside it.
02-suite.zolo
// @suite grouping with nested suites (T1).
@suite("default_state")
mod state_suite {
@test
fn tem_dois_itens() {
expect([1, 2]).to_have_len(2)
}
@suite("quando vazio")
mod vazio {
@test
fn lista_vazia() {
expect([]).to_be_empty()
}
}
}
Requires the Zolo CLI/host — open in the playground or run locally.
Any @test that is not inside a @suite belongs to the file's implicit suite.
Prefer @suite whenever you want to name the context or nest scenarios.
See also