mix surfex.test (Surfex v0.7.2)

Copy Markdown View Source

Runs a requirement's tests as surfex reads them (Surfex.Select, §11): every test whose verifies: declarations resolve to the unit, a list's members included.

mix surfex.test cart-add                 # the tests declaring it
mix surfex.test spec.md#carts --within   # and those of the units inside it
mix surfex.test cart-add --list          # name them; run nothing
mix surfex.test cart-add -- --trace      # what follows `--` goes to mix test

mix test --only verifies:cart-add selects a test tagged ["cart-add", "carts"] by neither id: ExUnit compares a list tag as one string. This task selects by declaration and runs mix test FILE:LINE … in a child process, which ExUnit's location filter selects exactly, then exits with that run's status. The run records its evidence as any run does. Each unit is any reference a tag may use. A unit that is unknown, ambiguous, or that no test declares is an error before anything runs.