diff --git a/src/__tests__/parser.ts b/src/__tests__/parser.ts index ded9e80e..3322439f 100644 --- a/src/__tests__/parser.ts +++ b/src/__tests__/parser.ts @@ -42,15 +42,13 @@ describe('parser', () => { RowHigherOrderComponent2: { prop1: { type: 'string' }, }, - // TODO: these are for some reason missing - // ColumnExternalHigherOrderComponent: { - // children, - // prop1: { type: 'string' }, - // }, - // RowExternalHigherOrderComponent: { - // children, - // prop1: { type: 'string' }, - // } + ColumnExternalHigherOrderComponent: { + children, + prop1: { type: 'string' }, + }, + RowExternalHigherOrderComponent: { + prop1: { type: 'string' }, + } }); }); @@ -102,7 +100,7 @@ describe('parser', () => { }); }); - it.only('should parse react component with properties extended from an external .tsx file', function(){ + it('should parse react component with properties extended from an external .tsx file', function(){ check('ExtendsExternalPropsComponent', { ExtendsExternalPropsComponent: { children, diff --git a/src/parser.ts b/src/parser.ts index 7e4d907b..33497762 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -171,10 +171,7 @@ class Parser { const result: Props = {}; propertiesOfProps.forEach(prop => { - console.log("parser.getPropsInfo prop: ", prop.name); - - const propName = prop.getName(); - + const propName = prop.getName(); // Find type of prop by looking in context of the props object itself. const propType = this.checker.getTypeOfSymbolAtLocation(prop, propsObj.valueDeclaration);