diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-03-29 20:32:02 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-03-29 20:32:02 +0000 |
| commit | 09ec9f0ec6615811f0391538270ea46edffa93be (patch) | |
| tree | 10431a5313ce6ce025063b56a8f203cc56f1cf70 | |
| parent | 15aaddae7a7e2dd8d369b514218778931a1543e0 (diff) | |
Add test for multiple paragraphs
| -rw-r--r-- | tests/documents.tests.js | 14 |
1 files changed, 14 insertions, 0 deletions
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("<p>Hello.</p><p>Goodbye.</p>", result.html); + }); + }) +}); + function paragraphOfText(text) { var run = runOfText(text); return new documents.Paragraph([run]); |
