Theia API Documentation v1.77.0
    Preparing search index...

    Interface TestItemCollection

    Collection of test items, found in TestItem.children and TestController.items.

    interface TestItemCollection {
        size: number;
        "[iterator]"(): Iterator<[id: string, testItem: TestItem], any, any>;
        add(item: TestItem): void;
        delete(itemId: string): void;
        forEach(
            callback: (item: TestItem, collection: TestItemCollection) => unknown,
            thisArg?: any,
        ): void;
        get(itemId: string): TestItem | undefined;
        replace(items: readonly TestItem[]): void;
    }

    Hierarchy

    • Iterable<[id: string, testItem: TestItem]>
      • TestItemCollection

    Implemented by

    Index
    size: number

    Gets the number of items in the collection.

    • Returns Iterator<[id: string, testItem: TestItem], any, any>

    • Removes a single test item from the collection.

      Parameters

      • itemId: string

        Item ID to delete.

      Returns void

    • Efficiently gets a test item by ID, if it exists, in the children.

      Parameters

      • itemId: string

        Item ID to get.

      Returns TestItem | undefined

      The found item or undefined if it does not exist.