TestItem

interface TestItem(source)

An item shown in the "test explorer" view.

A TestItem can represent either a test suite or a test itself, since they both have similar capabilities.

Online Documentation

Properties

Link copied to clipboard
abstract var busy: Boolean

Controls whether the item is shown as "busy" in the Test Explorer view. This is useful for showing status while discovering children.

Link copied to clipboard

Indicates whether this test item may have children discovered by resolving.

Link copied to clipboard

The children of this test item. For a test suite, this may contain the individual test cases or nested suites.

Link copied to clipboard
abstract var description: String?

Optional description that appears next to the label.

Link copied to clipboard
abstract var error: JsAny?

Optional error encountered while loading the test.

Link copied to clipboard
abstract val id: String

Identifier for the TestItem. This is used to correlate test results and tests in the document with those in the workspace (test explorer). This cannot change for the lifetime of the TestItem, and must be unique among its parent's direct children.

Link copied to clipboard
abstract var label: String

Display name describing the test case.

Link copied to clipboard
abstract val parent: TestItem?

The parent of this item. It's set automatically, and is undefined top-level items in the TestController.items and for items that aren't yet included in another item's children.

Link copied to clipboard
abstract var range: Range?

Location of the test item in its uri.

Link copied to clipboard
abstract var sortText: String?

A string that should be used when comparing this item with other items. When falsy the label is used.

Link copied to clipboard
abstract var tags: ReadonlyArray<TestTag>

Tags associated with this test item. May be used in combination with tags, or simply as an organizational feature.

Link copied to clipboard
abstract val uri: Uri?

URI this TestItem is associated with. May be a file or directory.