import { applyTransform } from '@hypermod/utils';
import * as transformer from '..';
describe('should migrate the Amount & CardHeaderAmount components', () => {
it('should migrate the size prop', async () => {
const result = await applyTransform(
transformer,
`
const App = () => (
<>
>
);
`,
{ parser: 'tsx' },
);
expect(result).toMatchInlineSnapshot(`
"const App = () => (
<>
>
);"
`);
});
it('should migrate the intent prop', async () => {
const result = await applyTransform(
transformer,
`
const App = () => (
<>
>
);
`,
{ parser: 'tsx' },
);
expect(result).toMatchInlineSnapshot(`
"const App = () => (
<>
>
);"
`);
});
it('should migrate the prefix prop', async () => {
const result = await applyTransform(
transformer,
`
const App = () => (
<>
>
);
`,
{ parser: 'tsx' },
);
expect(result).toMatchInlineSnapshot(`
"const App = () => (
<>
>
);"
`);
});
});