test(language-service): recognize inputs/ouputs declared in decorator (#34875)

This commit adds a regression test to check that the language service
recognizes inputs and outputs declared in a directive decorator.

See #34874.

PR Close #34875
This commit is contained in:
ayazhafiz
2020-01-20 11:31:15 -08:00
committed by Andrew Kushnir
parent 2f2396cac0
commit c99a4f8b3e
3 changed files with 19 additions and 0 deletions

View File

@ -654,6 +654,14 @@ describe('diagnostics', () => {
expect(ngDiags).toEqual([]);
});
// Issue https://github.com/angular/angular/issues/34874
it('should recognize inputs and outputs listed inside directive decorators', () => {
mockHost.override(
TEST_TEMPLATE, `<div hint-model [hint]="title" (hintChange)="myClick($event)"></div>`);
const ngDiags = ngLS.getSemanticDiagnostics(TEST_TEMPLATE);
expect(ngDiags).toEqual([]);
});
it('should be able to resolve modules using baseUrl', () => {
mockHost.override(APP_COMPONENT, `
import { Component } from '@angular/core';