diff --git a/modules/@angular/compiler/test/directive_resolver_spec.ts b/modules/@angular/compiler/test/directive_resolver_spec.ts index d139eaf841..7e75be9e1d 100644 --- a/modules/@angular/compiler/test/directive_resolver_spec.ts +++ b/modules/@angular/compiler/test/directive_resolver_spec.ts @@ -108,6 +108,15 @@ class SomeDirectiveWithViewChild { class ComponentWithTemplate { } +@Directive({ + selector: 'someDirective', + host: {'[decorator]': 'decorator'}, + inputs: ['decorator'], +}) +class SomeDirectiveWithSameHostBindingAndInput { + @Input() @HostBinding() prop: any; +} + class SomeDirectiveWithoutMetadata {} export function main() { @@ -190,6 +199,12 @@ export function main() { expect(directiveMetadata.host).toEqual({'[c]': 'c', '[a]': 'a', '[renamed]': 'b'}); }); + it('should append host binding and input on the same property', () => { + const directiveMetadata = resolver.resolve(SomeDirectiveWithSameHostBindingAndInput); + expect(directiveMetadata.host).toEqual({'[decorator]': 'decorator', '[prop]': 'prop'}); + expect(directiveMetadata.inputs).toEqual(['decorator', 'prop']); + }); + it('should append host listeners', () => { const directiveMetadata = resolver.resolve(SomeDirectiveWithHostListeners); expect(directiveMetadata.host)