Options
All
  • Public
  • Public/Protected
  • All
Menu

Options given to {@link TestController.runTests}

层级

  • TestRun

索引

Properties(3)

Optional Readonly name

name: 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.

Readonly token

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

Readonly isPersisted

isPersisted: boolean

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

Methods(8)

enqueued

  • Indicates a test is queued for later execution.

    Parameters

    Returns void

started

  • Indicates a test has started running.

    Parameters

    Returns void

skipped

  • Indicates a test has been skipped.

    Parameters

    Returns void

failed

  • Indicates a test has failed. You should pass one or more TestMessages to describe the failure.

    Parameters

    • test: TestItem

      Test item to update.

    • message: TestMessage | readonly TestMessage[]
    • Optional duration: number

      How long the test took to execute, in milliseconds.

    Returns void

errored

  • 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.

    Parameters

    • test: TestItem

      Test item to update.

    • message: TestMessage | readonly TestMessage[]
    • Optional duration: number

      How long the test took to execute, in milliseconds.

    Returns void

passed

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

    Parameters

    • test: TestItem

      Test item to update.

    • Optional duration: number

      How long the test took to execute, in milliseconds.

    Returns void

appendOutput

  • appendOutput(output: string): void
  • 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.

    Parameters

    • output: string

      Output text to append.

    Returns void

end

  • 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.

    Returns void

VS Code 插件开发中文文档 | VS Code 中文文档 | VS Code 官网文档 | VS Code 扩展市场

Generated by TypeDoc