aboutsummaryrefslogtreecommitdiff
path: root/tests/document-to-html.tests.js
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2014-07-17 14:54:09 +0100
committerJohn McLear <john@mclear.co.uk>2014-07-17 14:54:09 +0100
commitdee71ef0fc6f21aee4c4685dd67b721147cbb159 (patch)
tree4491fd7cfc810cea706a3e0bee0de599a4aa8368 /tests/document-to-html.tests.js
parentfa380c6232176c13120211594ff49e8bca5f149a (diff)
underline support and test coverage for underline
Diffstat (limited to 'tests/document-to-html.tests.js')
-rw-r--r--tests/document-to-html.tests.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/document-to-html.tests.js b/tests/document-to-html.tests.js
index 3b3bd9b..e8d6d27 100644
--- a/tests/document-to-html.tests.js
+++ b/tests/document-to-html.tests.js
@@ -139,6 +139,24 @@ describe('DocumentConverter', function() {
});
});
+ test('underline runs are wrapped in <u> tags', function() {
+ var run = runOfText("Hello.", {isUnderline: true});
+ var converter = new DocumentConverter();
+ return converter.convertToHtml(run).then(function(result) {
+ assert.equal(result.value, "<u>Hello.</u>");
+ });
+ });
+
+ test('underline runs can exist inside other tags', function() {
+ var run = new documents.Paragraph([
+ runOfText("Hello.", {isUnderline: true})
+ ]);
+ var converter = new DocumentConverter();
+ return converter.convertToHtml(run).then(function(result) {
+ assert.equal(result.value, "<p><u>Hello.</u></p>");
+ });
+ });
+
test('italic runs are wrapped in <em> tags', function() {
var run = runOfText("Hello.", {isItalic: true});
var converter = new DocumentConverter();