@cucumber/core
    Preparing search index...

    Interface SupportCodeLibrary

    Sealed library of support code that provides hooks and step definitions

    interface SupportCodeLibrary {
        findAllAfterHooksBy(
            tags: readonly string[],
        ): readonly DefinedTestCaseHook[];
        findAllBeforeHooksBy(
            tags: readonly string[],
        ): readonly DefinedTestCaseHook[];
        findAllStepsBy(text: string): readonly MatchedStep[];
        getAllAfterAllHooks(): readonly DefinedTestRunHook[];
        getAllBeforeAllHooks(): readonly DefinedTestRunHook[];
        getAllSources(): readonly SourceReference[];
        getExpressionGenerator(): CucumberExpressionGenerator;
        toEnvelopes(): readonly Envelope[];
    }
    Index

    Methods

    • Find all After hooks that match the given tags

      Parameters

      • tags: readonly string[]

      Returns readonly DefinedTestCaseHook[]

      Hooks are returned in definition order. For execution, the order should be reversed.

    • Find all step definitions whose expression is a match for the given text

      Parameters

      • text: string

      Returns readonly MatchedStep[]

    • Get all source references from across all support code

      Returns readonly SourceReference[]

    • Get a generator for Cucumber Expressions based on the currently defined parameter types

      Returns CucumberExpressionGenerator

    • Produces a list of Cucumber Messages envelopes for the support code, with the original definition order retained

      Returns readonly Envelope[]