Skip to content

Commit

Permalink
fix(addon-docs): add any types to props so it builds
Browse files Browse the repository at this point in the history
  • Loading branch information
andezzat committed Oct 1, 2020
1 parent 73369c2 commit 5efc1ff
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions addons/docs/src/frameworks/react/jsxDecorator.test.tsx
Expand Up @@ -103,26 +103,26 @@ describe('renderJsx', () => {
'item 18',
'item 19'
]}
/>
/>
`);
});

it('forwardRef component', () => {
const MyExoticComponent = React.forwardRef(function MyExoticComponent({ children }, _ref) {
return <div>{children}</div>;
const MyExoticComponent = React.forwardRef(function MyExoticComponent(props: any, _ref) {
return <div>{props.children}</div>;
});

expect(renderJsx(<MyExoticComponent>I'm forwardRef!</MyExoticComponent>, {}))
.toMatchInlineSnapshot(`
<MyExoticComponent>
I'm forwardRef!
</MyExoticComponent>
`);
<MyExoticComponent>
I'm forwardRef!
</MyExoticComponent>
`);
});

it('memo component', () => {
const MyMemoComponent = React.memo(function MyMemoComponent({ children }) {
return <div>{children}</div>;
const MyMemoComponent = React.memo(function MyMemoComponent(props: any) {
return <div>{props.children}</div>;
});

expect(renderJsx(<MyMemoComponent>I'm memo!</MyMemoComponent>, {})).toMatchInlineSnapshot(`
Expand Down

0 comments on commit 5efc1ff

Please sign in to comment.