kw with
Contextual keyword — test header (§18.1)
The list of words: §1.4
Syntax
Test = "test" [ TestKind ] StrLit [ "with" EnvList ] [ "seeds" Expr ] Block ;Grammar: App. A
Defined in
- 1.4 Keywords — Reserved (cannot be used as names)
- 18.1 Test declaration — Form: attributes* test kind?
- 18.2 Assertions and fixtures — assert expr is executed in all profiles, including prod (profiles switch off only contracts, §6.7, and the output of dbg, §2.2); on failure
Examples
@tag(slow, db)
test integ "order flow" with cluster(nodes: 3) { … }fixture tempDb() -> Db {
let d = Db.open("sqlite::memory:")
yield d // the test runs here
d.close()
}
test "insert" with tempDb as db { db.insert(order) }— 18.2 Assertions and fixtures