diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-04-01 16:57:41 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-04-01 16:57:41 +0100 |
| commit | 25109ca7e318e188229cac92552ba0dcd7e897a1 (patch) | |
| tree | 324cecb9ddc3cd5ad85c45143cbe1513aa3e2edc /tests | |
| parent | 376094a18d76eef4335e374455f0b2869e53120b (diff) | |
Add conversion of hyperlink elements to <a> tags
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/document-to-html.tests.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/document-to-html.tests.js b/tests/document-to-html.tests.js index a53039b..7c84482 100644 --- a/tests/document-to-html.tests.js +++ b/tests/document-to-html.tests.js @@ -131,6 +131,17 @@ describe('DocumentConverter', function() { assert.equal(result.html, "<strong>Hello.</strong>"); }); }); + + test('docx hyperlink is converted to <a>', function() { + var hyperlink = new documents.Hyperlink( + [runOfText("Hello.")], + {href: "http://www.example.com"} + ); + var converter = new DocumentConverter(); + return converter.convertToHtml(hyperlink).then(function(result) { + assert.equal(result.html, '<a href="http://www.example.com">Hello.</a>'); + }); + }); }); function paragraphOfText(text, styleName) { |
