Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
potatowagon committed May 16, 2024
1 parent b39eb63 commit ff8c5c4
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ describe('Markdown', () => {
skipExport?: true;
skipImport?: true;
shouldIncludeBlankLines?: true;
isNewlineDelimited?: false;
}>;

const URL = 'https://lexical.dev';
Expand Down Expand Up @@ -150,6 +151,7 @@ describe('Markdown', () => {
},
{
html: '<h1><span style="white-space: pre-wrap;">Hello</span></h1><p><br></p><p><br></p><p><br></p><p><b><strong style="white-space: pre-wrap;">world</strong></b><span style="white-space: pre-wrap;">!</span></p>',
isNewlineDelimited: false,
md: '# Hello\n\n\n\n**world**!',
shouldIncludeBlankLines: true,
},
Expand Down Expand Up @@ -268,7 +270,7 @@ describe('Markdown', () => {
});
}

for (const {html, md, skipExport} of IMPORT_AND_EXPORT) {
for (const {html, md, skipExport, isNewlineDelimited} of IMPORT_AND_EXPORT) {
if (skipExport) {
continue;
}
Expand Down Expand Up @@ -301,7 +303,13 @@ describe('Markdown', () => {
expect(
editor
.getEditorState()
.read(() => $convertToMarkdownString(TRANSFORMERS)),
.read(() =>
$convertToMarkdownString(
TRANSFORMERS,
undefined,
isNewlineDelimited,
),
),
).toBe(md);
});
}
Expand Down

0 comments on commit ff8c5c4

Please sign in to comment.