class OutputAssertion
A class that provides assertion methods to be applied to a selection of rendered output elements.
class OutputAssertion
Notes
- An instance of this class is returned by the TestCase.expectOutputAsync(), TestRenderer.expectOutput(), and TestRenderer.expectOutputAsync() methods. Use these methods to create new assertions based on the currently rendered (test) output.
Constructor
- constructor(elements, select?)Creates a new assertion based on given elements, optionally filtered using given selection criteria.
Instance Members
- elements readonlyThe elements to be asserted.
- containing(select)Returns a new OutputAssertion for any elements that are contained by the current set of elements (i.e. container content), directly or indirectly, which match the given selection filter.
- getSingle()Returns the currently matched output element, if there’s only one.
- getSingleView(type)Returns the view object that rendered the currently matched output element, if there’s only one.
- toBeRendered(description?)Asserts that any output elements were matched at all.
- toBeEmpty(description?)Asserts that no elements were matched at all.