Skip to content

Commit

Permalink
Update MatTooltip's "message not present" test to use null/undefined …
Browse files Browse the repository at this point in the history
…types outright.

We were using nullness assertions to cause these assignments to succeed, but we should allow users to set null/undefined values outright.

Right now we don't, so this update will cause the tests to fail. But this will be soon fixed.
  • Loading branch information
Eyas authored Jul 8, 2024
1 parent e6535b7 commit 5898911
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/material/tooltip/tooltip.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,12 +413,12 @@ describe('MDC-based MatTooltip', () => {
it('should not show tooltip if message is not present or empty', () => {
assertTooltipInstance(tooltipDirective, false);

tooltipDirective.message = undefined!;
tooltipDirective.message = undefined;
fixture.detectChanges();
tooltipDirective.show();
assertTooltipInstance(tooltipDirective, false);

tooltipDirective.message = null!;
tooltipDirective.message = null;
fixture.detectChanges();
tooltipDirective.show();
assertTooltipInstance(tooltipDirective, false);
Expand Down

0 comments on commit 5898911

Please sign in to comment.