MCPcopy
hub / github.com/angular/components / assertTooltipInstance

Function assertTooltipInstance

src/material/tooltip/tooltip.spec.ts:1724–1729  ·  view source on GitHub ↗

Asserts whether a tooltip directive has a tooltip instance.

(tooltip: MatTooltip, shouldExist: boolean)

Source from the content-addressed store, hash-verified

1722
1723/** Asserts whether a tooltip directive has a tooltip instance. */
1724function assertTooltipInstance(tooltip: MatTooltip, shouldExist: boolean): void {
1725 // Note that we have to cast this to a boolean, because Jasmine will go into an infinite loop
1726 // if it tries to stringify the `_tooltipInstance` when an assertion fails. The infinite loop
1727 // happens due to the `_tooltipInstance` having a circular structure.
1728 expect(!!tooltip._tooltipInstance).toBe(shouldExist);
1729}
1730
1731function finishCurrentTooltipAnimation(overlayContainer: HTMLElement, isVisible: boolean) {
1732 const tooltip = overlayContainer.querySelector('.mat-mdc-tooltip')!;

Callers 1

tooltip.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…