Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ISpecGiven

This interface is implemented by the return value of a Story's Given function.

It can be used to chain multiple Given functions together sequentially by calling .And in order to create an initial state.

Hierarchy

  • ISpecGiven

Index

Properties

Properties

And

And: function

Call this function to chain multiple Given functions together sequentially in order to create an initial state.

Alternatively, if you can nest another Given inside the bodyFunc to express diverging "Story lines".

Once you finished describing all initial states, you can invoke a state change by calling When inside the bodyFunc of this function.

To validate an initial state with acceptance criteria, use Then inside the bodyFunc of this function.

param

a short description of an initial state

param

Use the body of this function to define acceptance criteria, nested initial states or state changes.

Type declaration

    • (description: string, bodyFunc?: function): ISpecGiven
    • Parameters

      • description: string
      • Optional bodyFunc: function
          • (): void
          • Returns void

      Returns ISpecGiven

Generated using TypeDoc