Module

Test.Spec

Package
purescript-spec
Repository
owickstrom/purescript-spec

#Name Source

type Name = String

#Only Source

type Only = Boolean

#Group Source

data Group t

Constructors

Instances

#Result Source

data Result

Constructors

Instances

#SpecEffects Source

type SpecEffects e = (avar :: AVAR, console :: CONSOLE, timer :: TIMER | e)

#Spec Source

type Spec eff t = State (Array (Group (Aff eff Unit))) t

#collect Source

collect :: forall r. Spec r Unit -> Array (Group (Aff r Unit))

#countTests Source

countTests :: forall r. Spec r Unit -> Int

Count the total number of tests in a spec

#describe Source

describe :: forall r. String -> Spec r Unit -> Spec r Unit

Combine a group of specs into a described hierarchy.

#describeOnly Source

describeOnly :: forall r. String -> Spec r Unit -> Spec r Unit

Combine a group of specs into a described hierarchy and mark it as the only group to actually be evaluated. (useful for quickly narrowing down on a set)

#pending Source

pending :: forall r. String -> Spec r Unit

Create a pending spec.

#pending' Source

pending' :: forall r. String -> Aff r Unit -> Spec r Unit

Create a pending spec with a body that is ignored by the runner. It can be useful for documenting what the spec should test when non-pending.

#it Source

it :: forall eff. String -> Aff eff Unit -> Spec eff Unit

Create a spec with a description.

#itOnly Source

itOnly :: forall eff. String -> Aff eff Unit -> Spec eff Unit

Create a spec with a description and mark it as the only one to be run. (useful for quickly narrowing down on a single test)