Skip to content

Commit 981f3d9

Browse files
authored
Merge pull request #45 from pvasek/fix/unit-tests-after-tsx-imports
Fixing test after making tsx import working
2 parents 46ca973 + b5a04a1 commit 981f3d9

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

src/__tests__/parser.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,13 @@ describe('parser', () => {
4242
RowHigherOrderComponent2: {
4343
prop1: { type: 'string' },
4444
},
45-
// TODO: these are for some reason missing
46-
// ColumnExternalHigherOrderComponent: {
47-
// children,
48-
// prop1: { type: 'string' },
49-
// },
50-
// RowExternalHigherOrderComponent: {
51-
// children,
52-
// prop1: { type: 'string' },
53-
// }
45+
ColumnExternalHigherOrderComponent: {
46+
children,
47+
prop1: { type: 'string' },
48+
},
49+
RowExternalHigherOrderComponent: {
50+
prop1: { type: 'string' },
51+
}
5452
});
5553
});
5654

@@ -102,7 +100,7 @@ describe('parser', () => {
102100
});
103101
});
104102

105-
it.only('should parse react component with properties extended from an external .tsx file', function(){
103+
it('should parse react component with properties extended from an external .tsx file', function(){
106104
check('ExtendsExternalPropsComponent', {
107105
ExtendsExternalPropsComponent: {
108106
children,

src/parser.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,7 @@ class Parser {
171171
const result: Props = {};
172172

173173
propertiesOfProps.forEach(prop => {
174-
console.log("parser.getPropsInfo prop: ", prop.name);
175-
176-
const propName = prop.getName();
177-
174+
const propName = prop.getName();
178175

179176
// Find type of prop by looking in context of the props object itself.
180177
const propType = this.checker.getTypeOfSymbolAtLocation(prop, propsObj.valueDeclaration);

0 commit comments

Comments
 (0)