Skip to content

Commit

Permalink
Revert "refactor: move component wise codemod logic into separate files"
Browse files Browse the repository at this point in the history
This reverts commit 534c016.
  • Loading branch information
snitin315 committed Jan 12, 2024
1 parent 125968e commit 647bbec
Show file tree
Hide file tree
Showing 9 changed files with 664 additions and 716 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import path from 'path';
import { applyTransform } from '@hypermod/utils';
import * as transformer from '..';
import { red } from '../utils';

it('should update the lineHeight & fontSize tokens', async () => {
const result = await applyTransform(
Expand Down Expand Up @@ -308,18 +307,18 @@ it('should correctly convert Title to Heading component', async () => {

expect(consoleSpy).toHaveBeenNthCalledWith(
1,
red('\n⛔️ Expression found in the "size" attribute, please update manually:'),
red(`${path.resolve(__dirname, __filename)}:11:10\n`),
transformer.red('\n⛔️ Expression found in the "size" attribute, please update manually:'),
transformer.red(`${path.resolve(__dirname, __filename)}:11:10\n`),
);
expect(consoleSpy).toHaveBeenNthCalledWith(
2,
red('\n⛔️ Expression found in the "size" attribute, please update manually:'),
red(`${path.resolve(__dirname, __filename)}:18:10\n`),
transformer.red('\n⛔️ Expression found in the "size" attribute, please update manually:'),
transformer.red(`${path.resolve(__dirname, __filename)}:18:10\n`),
);
expect(consoleSpy).toHaveBeenNthCalledWith(
3,
red('\n⛔️ Expression found in the "size" attribute, please update manually:'),
red(`${path.resolve(__dirname, __filename)}:18:84\n`),
transformer.red('\n⛔️ Expression found in the "size" attribute, please update manually:'),
transformer.red(`${path.resolve(__dirname, __filename)}:18:84\n`),
);

expect(result).toMatchInlineSnapshot(`
Expand Down
Loading

0 comments on commit 647bbec

Please sign in to comment.