Skip to content

Commit

Permalink
Add failing test to illustrate bug with markdown-to-draft
Browse files Browse the repository at this point in the history
Disabled the failing test so that specs still pass, but keep it in place to remind us that it should be resolved.

The bug is that in cases when someone has a multi-line blockquote with blank lines, markdown generated should have empty `>` lines, but it instead simply strips those lines.
  • Loading branch information
Rose Robertson committed Oct 9, 2019
1 parent 9652844 commit 71b848b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/idempotency.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ describe('idempotency', function () {
expect(markdownFromDraft).toEqual(markdownString);
});

// TODO this test should pass but markdown-to-draft doesn’t correctly create empty markdown blocks in this case currently.
xit('renders blockquotes with blank lines correctly', function () {
var markdownString = '> Hello I am Blockquote\n> more\n> \n> \n> hey';
var draftJSObject = markdownToDraft(markdownString);
var markdownFromDraft = draftToMarkdown(draftJSObject);

expect(markdownFromDraft).toEqual(markdownString);
});

it('renders links correctly', function () {
var markdown = 'This is a test of [a link](https://google.com)\n\nAnd [perhaps](https://facebook.github.io/draft-js/) we should test once more.';
var rawDraftConversion = markdownToDraft(markdown);
Expand Down

0 comments on commit 71b848b

Please sign in to comment.