Skip to content

Commit e065e4d

Browse files
committed
rename InterfacePropsComponent
Signed-off-by: Winner95 <Winner95@users.noreply.github.com>
1 parent 09fbe6c commit e065e4d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

__tests__/handler.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ describe('typescript-react-function-component-props-handler', () => {
9595
// Line 86 in index.js uses TSInterfaceDeclaration
9696
test('handles components with interface props', () => {
9797
const doc = parseFixture('InterfacePropsComponent.tsx');
98-
expect(doc.displayName).toBe('ComponentWithInterface');
98+
expect(doc.displayName).toBe('InterfacePropsComponent');
9999

100100
expect(doc).toHaveProperty('props');
101101
expect(doc.props).toHaveProperty('label');

fixtures/InterfacePropsComponent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ interface InterfaceProps {
55
disabled?: boolean;
66
}
77

8-
const ComponentWithInterface: React.FC<InterfaceProps> = (props) => {
8+
const InterfacePropsComponent: React.FC<InterfaceProps> = (props) => {
99
return <button disabled={props.disabled}>{props.label}</button>;
1010
};
1111

12-
export default ComponentWithInterface;
12+
export default InterfacePropsComponent;

0 commit comments

Comments
 (0)