OxL Reference

kw with

Contextual keyword — test header (§18.1)

The list of words: §1.4

Syntax

ebnf
Test        = "test" [ TestKind ] StrLit [ "with" EnvList ] [ "seeds" Expr ] Block ;

Grammar: App. A

Defined in

Examples

oxl
@tag(slow, db)
test integ "order flow" with cluster(nodes: 3) { … }

— 18.1 Test declaration

oxl
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

Related diagnostics

test-decl, fixture-yield

See also