Collection of test items, found in {@link TestItem.children} and {@link TestController.items}.

Fields

read onlysize:Int

Gets the number of items in the collection.

replace(items:ReadOnlyArray<TestItem>):Void

Replaces the items stored by the collection.

Parameters:

items

Items to store.

get(itemId:String):Null<TestItem>

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

Parameters:

itemId

Item ID to get.

Returns:

The found item or undefined if it does not exist.

forEach(callback:(item:TestItem, collection:TestItemCollection) ‑> Any, ?thisArg:Any):Void

Iterate over each entry in this collection.

Parameters:

callback

Function to execute for each entry.

thisArg

The this context used when invoking the handler function.

delete(itemId:String):Void

Removes a single test item from the collection.

Parameters:

itemId

Item ID to delete.

add(item:TestItem):Void

Adds the test item to the children. If an item with the same ID already exists, it'll be replaced.

Parameters:

items

Item to add.