From 09ec9f0ec6615811f0391538270ea46edffa93be Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 29 Mar 2013 20:32:02 +0000 Subject: Add test for multiple paragraphs --- tests/documents.tests.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') diff --git a/tests/documents.tests.js b/tests/documents.tests.js index 7d2b5b4..ba6edc6 100644 --- a/tests/documents.tests.js +++ b/tests/documents.tests.js @@ -17,6 +17,20 @@ describe('DocumentConverter', function() { }) }); + +describe('DocumentConverter', function() { + test('should convert document containing multiple paragraphs to multiple p elements', function() { + var document = new documents.Document([ + paragraphOfText("Hello."), + paragraphOfText("Goodbye.") + ]); + var converter = new DocumentConverter(); + return converter.convertToHtml(document).then(function(result) { + assert.equal("

Hello.

Goodbye.

", result.html); + }); + }) +}); + function paragraphOfText(text) { var run = runOfText(text); return new documents.Paragraph([run]); -- cgit v1.2.3