@cucumber/node
    Preparing search index...

    Type Alias TestCaseContext

    A context object injected into every test step function as the first argument.

    type TestCaseContext = {
        assert: TestContext["assert"];
        attach: AttachFunction;
        link: LinkFunction;
        log: LogFunction;
        mock: TestContext["mock"];
        world: World;
        skip(): void;
        todo(): void;
    }
    Index

    Properties

    Methods

    Properties

    assert: TestContext["assert"]

    The assert object as provided by the test runner, including the normal methods from node:assert plus extras for dealing with snapshots.

    Capture an attachment of some content that should be associated with this test step, and might be accessed later in a report

    Capture a URL attachment against this step

    Capture a "log" attachment against this step

    mock: TestContext["mock"]

    The mock object as provided by the test runner.

    world: World

    An object scoped only to this test case, that can be used to share state between test steps

    Methods

    • Mark this test step as skipped. This will cause all subsequent steps to be skipped, except After hooks

      Returns void

      Results in a Cucumber status of "skipped" for the scenario.

    • Mark this test step as pending. This will cause all subsequent steps to be skipped, except After hooks

      Returns void

      Results in a Cucumber status of "pending" for the scenario.