@elysiumoss/ui-capture - v0.3.0
    Preparing search index...

    Function filterStates

    • Narrows a states list to the named states, and to those only.

      An ancestor reached through extends is resolution input, not a capture target. Returning it alongside the named states — which is what a flat "keep the ancestors too" list does — captures states the user did not name and re-runs their side-effecting steps, a request seed among them, which is the opposite of what a filter means. So the chain is resolved here and folded into each named state instead: the returned states carry everything the chain contributes — the ancestors' steps, the inherited url and the inherited allowVideoReplay — and carry no extends, so a filtered run captures each named state exactly as an unfiltered one does.

      Throws when a name matches nothing, because silently running zero states is the coverage lie again, and propagates StateDefinitionError from chain resolution — a filtered run has to resolve before it can be flattened.

      Parameters

      Returns readonly CaptureState[]