Skip to content

Commit

Permalink
Merge pull request #45 from pvasek/fix/unit-tests-after-tsx-imports
Browse files Browse the repository at this point in the history
Fixing test after making tsx import working
  • Loading branch information
pvasek authored Sep 8, 2017
2 parents 46ca973 + b5a04a1 commit 981f3d9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
18 changes: 8 additions & 10 deletions src/__tests__/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
}
});
});

Expand Down Expand Up @@ -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,
Expand Down
5 changes: 1 addition & 4 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 981f3d9

Please sign in to comment.