Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TestRun

Options given to {@link TestController.runTests}

Hierarchy

  • TestRun

Index

Properties

isPersisted: boolean

Whether the test run will be persisted across reloads by the editor.

stubbed
name: undefined | string

The human-readable name of the run. This can be used to disambiguate multiple sets of results in a test run. It is useful if tests are run across multiple platforms, for example.

stubbed

A cancellation token which will be triggered when the test run is canceled from the UI.

stubbed

Methods

  • Appends raw output from the test runner. On the user's request, the output will be displayed in a terminal. ANSI escape sequences, such as colors and text styles, are supported.

    stubbed

    Parameters

    • output: string

      Output text to append.

    • Optional location: Location

      Indicate that the output was logged at the given location.

    • Optional test: TestItem

      Test item to associate the output with.

    Returns void

  • end(): void
  • Signals that the end of the test run. Any tests included in the run whose states have not been updated will have their state reset.

    stubbed

    Returns void

  • Indicates a test has errored. You should pass one or more TestMessages to describe the failure. This differs from the "failed" state in that it indicates a test that couldn't be executed at all, from a compilation error for example.

    stubbed

    Parameters

    • test: TestItem

      Test item to update.

    • message: TestMessage | readonly TestMessage[]

      Messages associated with the test failure.

    • Optional duration: number

      How long the test took to execute, in milliseconds.

    Returns void

  • passed(test: TestItem, duration?: number): void
  • Indicates a test has passed.

    stubbed

    Parameters

    • test: TestItem

      Test item to update.

    • Optional duration: number

      How long the test took to execute, in milliseconds.

    Returns void