Skip to main content

MochaAdapter

Allows for programmatic execution of Mocha test scenarios, using SerenityReporterForMocha to report progress.

Learn more

Implements

  • TestRunnerAdapter

Index

Constructors

constructor

Methods

successThreshold

  • successThreshold(): Outcome | { Code: number }
  • Scenario success threshold for this test runner.


    Returns Outcome | { Code: number }

load

  • load(pathsToScenarios: string[]): Promise<void>
  • Loads test scenarios.


    Parameters

    • pathsToScenarios: string[]

    Returns Promise<void>

scenarioCount

  • scenarioCount(): number
  • Returns the number of loaded scenarios

    @throws

    LogicError If called before load


    Returns number

run

  • run(): Promise<void>
  • Runs loaded test scenarios.

    @throws

    LogicError If called before load


    Returns Promise<void>