Skip to content

Commit

Permalink
rm unintended changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamwasp committed Oct 7, 2024
1 parent 5f2b6e6 commit 3cb39c5
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions packages/gamut/src/Markdown/__tests__/Markdown.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@ const checkboxMarkdown = `
- [ ] third checkbox
`;

const table = `
| Tables | Are | Cool |
|----------|:-------------:|------:|
| col 1 is | left-aligned | $1600 |
| col 2 is | centered | $12 |
| col 3 is | right-aligned | $1 |
`;

const renderView = setupRtl(Markdown);

describe('<Markdown />', () => {
Expand All @@ -68,13 +60,27 @@ describe('<Markdown />', () => {
});

it('Renders custom tables in markdown', () => {
const table = `
| Tables | Are | Cool |
|----------|:-------------:|------:|
| col 1 is | left-aligned | $1600 |
| col 2 is | centered | $12 |
| col 3 is | right-aligned | $1 |
`;
renderView({ text: table });
expect(document.querySelectorAll('div.tableWrapper table').length).toEqual(
1
);
});

it('Skips rendering custom tables in markdown when skipProcessing.table is true', () => {
const table = `
| Tables | Are | Cool |
|----------|:-------------:|------:|
| col 1 is | left-aligned | $1600 |
| col 2 is | centered | $12 |
| col 3 is | right-aligned | $1 |
`;
renderView({
skipDefaultOverrides: { table: true },
text: table,
Expand Down

0 comments on commit 3cb39c5

Please sign in to comment.