Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ISpecWhen

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

It can be used to chain multiple When functions together sequentially by calling .And.

Hierarchy

  • ISpecWhen

Index

Properties

Properties

And

And: function

Call this function to chain multiple When functions together sequentially.

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

To validate the state following a state change with acceptance criteria, use Then inside the bodyFunc of When.

param

a short description of an initial state

param

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

Type declaration

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

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

      Returns ISpecWhen

Generated using TypeDoc