Przeglądaj źródła

Tests: Restored a removed test.

Piotrek Koszuliński 6 lat temu
rodzic
commit
1438ff91c3

+ 5 - 1
packages/ckeditor5-clipboard/tests/utils/plaintexttohtml.js

@@ -10,10 +10,14 @@ describe( 'plainTextToHtml()', () => {
 		expect( plainTextToHtml( 'x y <z>' ) ).to.equal( 'x y &lt;z&gt;' );
 	} );
 
-	it( 'turns single line breaks into paragraphs', () => {
+	it( 'turns a single line break into paragraphs', () => {
 		expect( plainTextToHtml( 'x\ny\nz' ) ).to.equal( '<p>x</p><p>y</p><p>z</p>' );
 	} );
 
+	it( 'turns double line breaks into paragraphs', () => {
+		expect( plainTextToHtml( 'x\n\ny\n\nz' ) ).to.equal( '<p>x</p><p></p><p>y</p><p></p><p>z</p>' );
+	} );
+
 	it( 'turns combination of different amount of line breaks to paragraphs', () => {
 		expect( plainTextToHtml( 'a\nb\n\nc\n\n\nd' ) ).to.equal( '<p>a</p><p>b</p><p></p><p>c</p><p></p><p></p><p>d</p>' );
 	} );