Skip to content

Commit

Permalink
test(compiler): Add back tests for renamed inputs and outputs
Browse files Browse the repository at this point in the history
angular#38685 corrected the confusion between field and property names so the consumer can
now be determined correctly.
  • Loading branch information
atscott committed Sep 10, 2020
1 parent 19598b4 commit 5979012
Showing 1 changed file with 8 additions and 10 deletions.
Expand Up @@ -690,11 +690,10 @@ runInEachFileSystem(() => {

const inputBbinding = (nodes[0] as TmplAstElement).inputs[1];
const bSymbol = templateTypeChecker.getSymbolOfNode(inputBbinding, cmp)!;
// TODO(atscott): The BoundTarget is not assigning renamed properties correctly
// assertInputBindingSymbol(bSymbol);
// expect((bSymbol.bindings[0].tsSymbol!.declarations[0] as ts.PropertyDeclaration)
// .name.getText())
// .toEqual('inputB');
assertInputBindingSymbol(bSymbol);
expect((bSymbol.bindings[0].tsSymbol!.declarations[0] as ts.PropertyDeclaration)
.name.getText())
.toEqual('inputB');
});

it('does not retrieve a symbol for an input when undeclared', () => {
Expand Down Expand Up @@ -983,11 +982,10 @@ runInEachFileSystem(() => {

const outputBBinding = (nodes[0] as TmplAstElement).outputs[1];
const bSymbol = templateTypeChecker.getSymbolOfNode(outputBBinding, cmp)!;
// TODO(atscott): The BoundTarget is not assigning renamed properties correctly
// assertOutputBindingSymbol(bSymbol);
// expect((bSymbol.bindings[0].tsSymbol!.declarations[0] as ts.PropertyDeclaration)
// .name.getText())
// .toEqual('outputB');
assertOutputBindingSymbol(bSymbol);
expect((bSymbol.bindings[0].tsSymbol!.declarations[0] as ts.PropertyDeclaration)
.name.getText())
.toEqual('outputB');
});

it('should find symbol for output binding when there are multiple directives', () => {
Expand Down

0 comments on commit 5979012

Please sign in to comment.