Skip to content

Commit

Permalink
chore: add test case(html block converting)
Browse files Browse the repository at this point in the history
  • Loading branch information
js87zz committed Feb 4, 2022
1 parent 49f66aa commit 307ae5d
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion apps/editor/src/__test__/unit/convertor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -944,8 +944,27 @@ describe('Convertor', () => {
assertConverting(markdown, expected);
});

it('should convert html block node as the block node through inserting the blank line', () => {
const markdown = source`
para1
<iframe src="https://www.youtube.com/embed/XyenY12fzAk" width="420" height="315"></iframe>
para2
`;
const expected = source`
para1
<iframe height="315" width="420" src="https://www.youtube.com/embed/XyenY12fzAk"></iframe>
para2
`;

assertConverting(markdown, expected);
});

it('should convert html inline node', () => {
const markdown = '<big class="my-big">content</big>';
const markdown = 'inline <big class="my-big">content</big>';

assertConverting(markdown, markdown);
});
Expand Down

0 comments on commit 307ae5d

Please sign in to comment.