Skip to content

Commit

Permalink
feat: add codemod tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackySoul committed Sep 16, 2024
1 parent 5df8e90 commit 6a1e0ba
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
import { } from '@vkontakte/vkui';
import { HorizontalScroll } from '@vkontakte/vkui';
import React from 'react';
import '@vkontakte/vkui/dist/vkui.css';

const App = () => {
return (
<React.Fragment>

<HorizontalScroll inline>
<div />
<div />
<div />
</HorizontalScroll>
<HorizontalScroll arrowSize="m" inline={true}>
<div />
<div />
<div />
</HorizontalScroll>
</React.Fragment>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`horizontal-scroll transforms correctly 1`] = `
"import { HorizontalScroll } from '@vkontakte/vkui';
import React from 'react';
import '@vkontakte/vkui/dist/vkui.css';
const App = () => {
return (
(<React.Fragment>
<HorizontalScroll>
<div />
<div />
<div />
</HorizontalScroll>
<HorizontalScroll arrowSize="m">
<div />
<div />
<div />
</HorizontalScroll>
</React.Fragment>)
);
};"
`;
10 changes: 4 additions & 6 deletions packages/vkui/src/components/HorizontalScroll/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,10 @@ const RandomUsers = () => {

```tsx static
<HorizontalScroll>
<ListWrapper>
<HorizontalCell>1</HorizontalCell>
<HorizontalCell>2</HorizontalCell>
<HorizontalCell>3</HorizontalCell>
<HorizontalCellShowMore />
</ListWrapper>
<HorizontalCell>1</HorizontalCell>
<HorizontalCell>2</HorizontalCell>
<HorizontalCell>3</HorizontalCell>
<HorizontalCellShowMore />
</HorizontalScroll>
```

Expand Down

0 comments on commit 6a1e0ba

Please sign in to comment.