Asserts whether a tooltip directive has a tooltip instance.
(tooltip: MatTooltip, shouldExist: boolean)
| 1722 | |
| 1723 | /** Asserts whether a tooltip directive has a tooltip instance. */ |
| 1724 | function 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 | |
| 1731 | function finishCurrentTooltipAnimation(overlayContainer: HTMLElement, isVisible: boolean) { |
| 1732 | const tooltip = overlayContainer.querySelector('.mat-mdc-tooltip')!; |
no outgoing calls
no test coverage detected
searching dependent graphs…