-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(tooltip): exception if mdTooltip is not a string #6146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Can you add a unit test for this? It should look something along the lines of this: it('should not throw when a truthy non-string is passed in', () => {
tooltipDirective.message = {};
expect(() => {
fixture.detectChanges();
tooltipDirective.show();
}).not.toThrow();
}); |
@crisbeto I can't do this. It gives me error (the method signature asks for a string):
|
Since it's only a test component, you can change the property signature to |
I'm not sure I follow what you mean.
|
I was talking about one of the test components here: https://github.com/angular/material2/blob/master/src/lib/tooltip/tooltip.spec.ts#L523 |
Changing |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes an error that is thrown if something rather than a string is passed via [mdTooltip]
@Input
, i.e:Results in the following error:
PLUNKER