CoverageRegistry

io.github.frikit.twirlspec.page.CoverageRegistry

Remembers which elements a spec's assertions actually looked at.

A spec renders the same page many times over — once per test — so the record is kept per coverage group rather than per page instance. A page rendered through the DSL belongs to its spec and, within it, to the renders that produce exactly its markup, unless the spec names a group with coveredAs. The key is spec#group, so a spec's records can be dropped together. A page built directly belongs to no spec and keeps its record on itself, so it never appears here.

Attributes

Source
CoverageRegistry.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def forget(spec: String): Unit

Forget every record a spec made, so a spec run again in the same JVM starts clean and a finished one leaves nothing behind.

Forget every record a spec made, so a spec run again in the same JVM starts clean and a finished one leaves nothing behind.

Attributes

Source
CoverageRegistry.scala
def record(sourceKey: String, paths: Iterable[String]): Unit

Remember that an assertion in this coverage group touched these anchors.

Remember that an assertion in this coverage group touched these anchors.

Attributes

Source
CoverageRegistry.scala
def reset(): Unit

Forget everything, for a spec that measures itself from a clean slate.

Forget everything, for a spec that measures itself from a clean slate.

Attributes

Source
CoverageRegistry.scala
def touched(sourceKey: String): Set[String]

Every anchor an assertion in this coverage group has touched so far.

Every anchor an assertion in this coverage group has touched so far.

Attributes

Source
CoverageRegistry.scala