Skip to main content
Version: Current

foundation-testing.fixture

Home > @genesislcap/foundation-testing > Fixture

Fixture interface

Unit test fixture.

Signature:

export interface Fixture<TElement = HTMLElement> 

Properties

PropertyModifiersTypeDescription
documentDocumentThe document the fixture is running in.
elementTElementThe first element in the Fixture.view.
parentHTMLElementThe parent element that the view was appended to.
templateViewTemplateThe template the fixture was created from.
viewHTMLViewThe view that was created from the fixture's template.

Methods

MethodDescription
connect()Adds the Fixture.parent to the DOM, causing the connect lifecycle to begin.
disconnect()Removes the Fixture.parent from the DOM, causing the disconnect lifecycle to begin.