From ed1473a31a6294617bf239cc1fd15272fd7c9946 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 1 Apr 2013 12:58:53 +0100 Subject: Add conversion to HTML of italic runs --- tests/documents.tests.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/documents.tests.js') diff --git a/tests/documents.tests.js b/tests/documents.tests.js index 9cd3a49..df10a92 100644 --- a/tests/documents.tests.js +++ b/tests/documents.tests.js @@ -103,6 +103,22 @@ describe('DocumentConverter', function() { assert.equal(result.html, "

Hello.

"); }); }); + + test('italic runs are wrapped in tags', function() { + var run = runOfText("Hello.", {isItalic: true}); + var converter = new DocumentConverter(); + return converter.convertToHtml(run).then(function(result) { + assert.equal(result.html, "Hello."); + }); + }); + + test('run can be both bold and italic', function() { + var run = runOfText("Hello.", {isBold: true, isItalic: true}); + var converter = new DocumentConverter(); + return converter.convertToHtml(run).then(function(result) { + assert.equal(result.html, "Hello."); + }); + }); }); function paragraphOfText(text, styleName) { -- cgit v1.2.3