diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-04-01 12:58:53 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-04-01 12:58:53 +0100 |
| commit | ed1473a31a6294617bf239cc1fd15272fd7c9946 (patch) | |
| tree | e1b90ff85bf5245b2978cffd8725d35dd9c43dce /tests | |
| parent | 9793af8582ba804b5e80fd7445abb6213b87be62 (diff) | |
Add conversion to HTML of italic runs
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/documents.tests.js | 16 |
1 files changed, 16 insertions, 0 deletions
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, "<p><strong>Hello.</strong></p>"); }); }); + + test('italic runs are wrapped in <em> tags', function() { + var run = runOfText("Hello.", {isItalic: true}); + var converter = new DocumentConverter(); + return converter.convertToHtml(run).then(function(result) { + assert.equal(result.html, "<em>Hello.</em>"); + }); + }); + + 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, "<strong><em>Hello.</em></strong>"); + }); + }); }); function paragraphOfText(text, styleName) { |
